From a1fc5d8becedbb6f93029d4e7deb68823df54a2c Mon Sep 17 00:00:00 2001 From: Ayan Sinha Mahapatra Date: Thu, 7 Dec 2023 19:41:47 +0530 Subject: [PATCH] Add new `sample_matches` attribute to top-level detection Signed-off-by: Ayan Sinha Mahapatra --- src/licensedcode/detection.py | 8 +- .../filtered-expected.json | 18 +- .../filtered-expected2.json | 18 +- .../filtered-expected3.json | 18 +- .../data/common/manifests-expected.json | 208 ++++++- .../data/common/manifests-expected.jsonlines | 208 ++++++- .../data/common/manifests-expected.yaml | 174 ++++++ .../yaml/package-and-licenses-expected.yaml | 233 +++++++ ...tional_license_combined_test.expected.json | 74 ++- ...ional_license_directory_test.expected.json | 32 +- ...ditional_license_plugin_test.expected.json | 18 +- ...e-reference-works-with-clues.expected.json | 402 ++++++++++++- ...-matched-text-with-reference.expected.json | 68 ++- .../scan-with-reference.expected.json | 68 ++- .../data/match_spdx/scan-expected.json | 18 +- .../unknown-license-expected.json | 18 +- .../unknown-license-text-expected.json | 16 + .../clues/woodstox.expected.json | 36 +- .../license-expression/scan.expected.json | 36 +- .../spdx-expressions.expected.json | 32 +- .../license-ref-see-copying.expected.json | 48 +- .../license_reference/scan-ref.expected.json | 48 +- ...-unknown-reference-copyright.expected.json | 78 ++- .../license_reference/scan-wref.expected.json | 18 +- ...unknown-ref-to-key-file-root.expected.json | 174 +++++- .../license_url/license_url.expected.json | 18 +- .../package/package.expected.json | 36 +- .../scan/e2fsprogs-expected.json | 18 +- .../scan/ffmpeg-license.expected.json | 172 +++++- .../sqlite/sqlite.expected.json | 18 +- .../text/scan-diag.expected.json | 36 +- .../plugin_license/text/scan.expected.json | 36 +- .../text_long_lines/scan-diag.expected.json | 36 +- .../text_long_lines/scan.expected.json | 36 +- ...n-unknown-intro-dual-license.expected.json | 58 ++ ...tro-eclipse-foundation-tycho.expected.json | 194 +++++- ...own-intro-eclipse-foundation.expected.json | 32 +- ...nown-intro-long-gaps-between.expected.json | 60 ++ ...intro-with-imperfect-matches.expected.json | 58 ++ .../file_with_multiple_licenses.expected.json | 32 +- .../policy-codebase.expected.json | 90 ++- .../plugin_license_text/scan.expected.json | 72 ++- .../many-podspecs-with-license-expected.json | 54 +- ...cted-with-test-manifests-with-license.json | 68 ++- ...ackage-instance-with-license-expected.json | 96 ++- .../activemq-camel.expected.json | 16 + .../google-built-collection.expected.json | 18 +- .../jquery-form-3.51.0.expected.json | 158 ++++- .../fizzler.expected.json | 120 +++- .../flutter_playtabs_bridge.expected.json | 76 ++- .../nanopb.expected.json | 48 +- .../reference-to-package/base.expected.json | 48 +- .../fusiondirectory.expected.json | 568 +++++++++++++++++- .../google_appengine_sdk.expected.json | 114 +++- .../paddlenlp.expected.json | 214 ++++++- .../physics.expected.json | 296 ++++++++- .../reference-to-package/samba.expected.json | 420 ++++++++++++- ...ackson-dataformat-xml-2.13.5-expected.json | 48 +- .../johnzon-jsonb-1.2.11-expected.json | 106 +++- .../assemble/numbers-1.7.4-expected.json | 36 +- ...htrace-core-4.0.0-incubating-expected.json | 114 +++- ....4-pypi-package-with-license-expected.json | 182 +++++- tests/scancode/data/info/all.expected.json | 36 +- .../data/info/all.rooted.expected.json | 36 +- .../scancode/data/license_text/test.expected | 18 +- .../plugin_only_findings/basic.expected.json | 36 +- .../component-package-build-expected.json | 72 ++- .../component-package-expected.json | 72 ++- .../license-holder-rollup-expected.json | 64 +- ...iple-same-holder-and-license-expected.json | 32 +- ...t-counted-in-license-holders-expected.json | 36 +- .../package-fileset-expected.json | 36 +- .../package-manifest-expected.json | 36 +- ...rectory-with-minority-origin-expected.json | 18 +- ...return-nested-local-majority-expected.json | 64 +- .../data/score/basic-expected.json | 54 +- ...consistent_licenses_copyleft-expected.json | 72 ++- .../summarycode/data/score/jar-expected.json | 86 ++- .../score/no_license_ambiguity-expected.json | 150 ++++- .../data/score/no_license_text-expected.json | 36 +- ...nflicting_license_categories.expected.json | 114 +++- .../summary/end-2-end/bug-1141.expected.json | 36 +- .../holders/clear_holder.expected.json | 68 ++- .../holders/combined_holders.expected.json | 68 ++- .../license_ambiguity/ambiguous.expected.json | 36 +- .../unambiguous.expected.json | 68 ++- .../multiple_package_data.expected.json | 140 ++++- .../single_file/single_file.expected.json | 18 +- .../summary-without-holder-pypi.expected.json | 182 +++++- ...holder_from_package_resource.expected.json | 18 +- .../with_package_data.expected.json | 104 +++- .../without_package_data.expected.json | 68 ++- .../tallies/end-2-end/bug-1141.expected.json | 36 +- .../full_tallies/tallies.expected.json | 230 ++++++- .../tallies_by_facet.expected.json | 230 ++++++- .../tallies_details.expected.json | 230 ++++++- ...lies_key_files-details.expected.json-lines | 212 ++++++- .../tallies_key_files.expected.json | 212 ++++++- .../no_todo/base64-arraybuffer.expected.json | 104 +++- .../unknown-license-expected-diag.json | 16 + .../unknown-license-expected.json | 18 +- 101 files changed, 8717 insertions(+), 316 deletions(-) diff --git a/src/licensedcode/detection.py b/src/licensedcode/detection.py index b0416f4592e..96abdc49967 100644 --- a/src/licensedcode/detection.py +++ b/src/licensedcode/detection.py @@ -670,6 +670,7 @@ def to_dict( if include_text: result['matched_text'] = matched_text + return result @@ -917,7 +918,12 @@ def dict_fields(attr, value): return True - return attr.asdict(self, filter=dict_fields) + detection_mapping = attr.asdict(self, filter=dict_fields) + detection_mapping["sample_matches"] = [ + match.to_dict(include_text=True) + for match in self.matches + ] + return detection_mapping def get_license_detection_object(self): return LicenseDetection( diff --git a/tests/cluecode/data/plugin_filter_clues/filtered-expected.json b/tests/cluecode/data/plugin_filter_clues/filtered-expected.json index 7bc72657f32..e2c3cc214f5 100644 --- a/tests/cluecode/data/plugin_filter_clues/filtered-expected.json +++ b/tests/cluecode/data/plugin_filter_clues/filtered-expected.json @@ -3,7 +3,23 @@ { "identifier": "apache_1_1-1712efcb-d696-b5e4-214d-b2ab69680c2a", "license_expression": "apache-1.1", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 96.07, + "from_file": "LICENSE", + "start_line": 7, + "end_line": 70, + "matched_length": 367, + "match_coverage": 100.0, + "matcher": "3-seq", + "license_expression": "apache-1.1", + "rule_identifier": "apache-1.1_63.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-1.1_63.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/cluecode/data/plugin_filter_clues/filtered-expected2.json b/tests/cluecode/data/plugin_filter_clues/filtered-expected2.json index d7cb041614a..61ae35898ea 100644 --- a/tests/cluecode/data/plugin_filter_clues/filtered-expected2.json +++ b/tests/cluecode/data/plugin_filter_clues/filtered-expected2.json @@ -3,7 +3,23 @@ { "identifier": "pygres_2_2-04f085e8-3db1-f9e2-8dde-7ba8a7ba619a", "license_expression": "pygres-2.2", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "LICENSE2", + "start_line": 7, + "end_line": 22, + "matched_length": 145, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "pygres-2.2", + "rule_identifier": "pygres-2.2_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pygres-2.2_2.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/cluecode/data/plugin_filter_clues/filtered-expected3.json b/tests/cluecode/data/plugin_filter_clues/filtered-expected3.json index 30dcc9f173d..508a3452189 100644 --- a/tests/cluecode/data/plugin_filter_clues/filtered-expected3.json +++ b/tests/cluecode/data/plugin_filter_clues/filtered-expected3.json @@ -3,7 +3,23 @@ { "identifier": "pcre-c61d8210-7748-d787-5e3e-fd64c6cd6b6a", "license_expression": "pcre", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "LICENSE3", + "start_line": 1, + "end_line": 47, + "matched_length": 303, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "pcre", + "rule_identifier": "pcre.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pcre.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/formattedcode/data/common/manifests-expected.json b/tests/formattedcode/data/common/manifests-expected.json index db58308da5a..85d3913d23c 100644 --- a/tests/formattedcode/data/common/manifests-expected.json +++ b/tests/formattedcode/data/common/manifests-expected.json @@ -472,52 +472,240 @@ { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/npm-license-mapping/package.json", + "start_line": 20, + "end_line": 20, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/npm-license-mapping/package.json", + "start_line": 6, + "end_line": 6, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] }, { "identifier": "cddl_1_0-c6dbef4d-659c-289f-5ee9-1ca0278edad6", "license_expression": "cddl-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 16.0, + "from_file": "manifests/maven/persistence-api-1.0.pom", + "start_line": 17, + "end_line": 19, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "license-intro_72.RULE", + "rule_relevance": 16, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_72.RULE", + "matched_text": null + }, + { + "score": 82.35, + "from_file": "manifests/maven/persistence-api-1.0.pom", + "start_line": 18, + "end_line": 20, + "matched_length": 14, + "match_coverage": 82.35, + "matcher": "3-seq", + "license_expression": "cddl-1.0", + "rule_identifier": "cddl-1.0_32.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cddl-1.0_32.RULE", + "matched_text": null + } + ] }, { "identifier": "cddl_1_0-dd3dd7df-afca-6a5e-492c-f7b279fdd880", "license_expression": "cddl-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/maven/persistence-api-1.0.pom", + "start_line": 1, + "end_line": 1, + "matched_length": 8, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cddl-1.0", + "rule_identifier": "cddl-1.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cddl-1.0.RULE", + "matched_text": "- name: Common Development and Distribution License (CDDL) v1.0" + }, + { + "score": 100.0, + "from_file": "manifests/maven/persistence-api-1.0.pom", + "start_line": 2, + "end_line": 2, + "matched_length": 7, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cddl-1.0", + "rule_identifier": "cddl-1.0_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cddl-1.0_4.RULE", + "matched_text": " url: http://www.sun.com/cddl/cddl.html" + } + ] }, { "identifier": "lgpl_3_0-272571eb-5e68-95b6-ddb0-71de2d8df321", "license_expression": "lgpl-3.0", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 74, + "end_line": 75, + "matched_length": 10, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0", + "rule_identifier": "pypi_gnu_lesser_general_public_license_v3.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_gnu_lesser_general_public_license_v3.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_3_0-121be3c2-9c80-df84-d3da-8f674e4125c0", "license_expression": "lgpl-3.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 9, + "end_line": 20, + "matched_length": 106, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0", + "rule_identifier": "lgpl-3.0_276.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_276.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_3_0-2db87bcf-56b4-9d7d-7075-2effae31c631", "license_expression": "lgpl-3.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 65, + "end_line": 65, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0", + "rule_identifier": "lgpl-3.0_152.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_152.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_3_0-38174920-e8ed-7bda-41ec-94df7380b7d5", "license_expression": "lgpl-3.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "lgpl-3.0", + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "LGPLv3" + } + ] }, { "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/npm-license-string/package.json", + "start_line": 4, + "end_line": 4, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/npm-license-string/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] } ], "files": [ diff --git a/tests/formattedcode/data/common/manifests-expected.jsonlines b/tests/formattedcode/data/common/manifests-expected.jsonlines index 41b80c9de38..70cdc5629d3 100644 --- a/tests/formattedcode/data/common/manifests-expected.jsonlines +++ b/tests/formattedcode/data/common/manifests-expected.jsonlines @@ -508,52 +508,240 @@ { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/npm-license-mapping/package.json", + "start_line": 20, + "end_line": 20, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/npm-license-mapping/package.json", + "start_line": 6, + "end_line": 6, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] }, { "identifier": "cddl_1_0-c6dbef4d-659c-289f-5ee9-1ca0278edad6", "license_expression": "cddl-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 16.0, + "from_file": "manifests/maven/persistence-api-1.0.pom", + "start_line": 17, + "end_line": 19, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "license-intro_72.RULE", + "rule_relevance": 16, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_72.RULE", + "matched_text": null + }, + { + "score": 82.35, + "from_file": "manifests/maven/persistence-api-1.0.pom", + "start_line": 18, + "end_line": 20, + "matched_length": 14, + "match_coverage": 82.35, + "matcher": "3-seq", + "license_expression": "cddl-1.0", + "rule_identifier": "cddl-1.0_32.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cddl-1.0_32.RULE", + "matched_text": null + } + ] }, { "identifier": "cddl_1_0-dd3dd7df-afca-6a5e-492c-f7b279fdd880", "license_expression": "cddl-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/maven/persistence-api-1.0.pom", + "start_line": 1, + "end_line": 1, + "matched_length": 8, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cddl-1.0", + "rule_identifier": "cddl-1.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cddl-1.0.RULE", + "matched_text": "- name: Common Development and Distribution License (CDDL) v1.0" + }, + { + "score": 100.0, + "from_file": "manifests/maven/persistence-api-1.0.pom", + "start_line": 2, + "end_line": 2, + "matched_length": 7, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cddl-1.0", + "rule_identifier": "cddl-1.0_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cddl-1.0_4.RULE", + "matched_text": " url: http://www.sun.com/cddl/cddl.html" + } + ] }, { "identifier": "lgpl_3_0-272571eb-5e68-95b6-ddb0-71de2d8df321", "license_expression": "lgpl-3.0", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 74, + "end_line": 75, + "matched_length": 10, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0", + "rule_identifier": "pypi_gnu_lesser_general_public_license_v3.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_gnu_lesser_general_public_license_v3.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_3_0-121be3c2-9c80-df84-d3da-8f674e4125c0", "license_expression": "lgpl-3.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 9, + "end_line": 20, + "matched_length": 106, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0", + "rule_identifier": "lgpl-3.0_276.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_276.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_3_0-2db87bcf-56b4-9d7d-7075-2effae31c631", "license_expression": "lgpl-3.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 65, + "end_line": 65, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0", + "rule_identifier": "lgpl-3.0_152.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_152.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_3_0-38174920-e8ed-7bda-41ec-94df7380b7d5", "license_expression": "lgpl-3.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "lgpl-3.0", + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "LGPLv3" + } + ] }, { "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/npm-license-string/package.json", + "start_line": 4, + "end_line": 4, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "manifests/npm-license-string/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] } ] }, diff --git a/tests/formattedcode/data/common/manifests-expected.yaml b/tests/formattedcode/data/common/manifests-expected.yaml index fa5639c179f..ebf82f29f33 100644 --- a/tests/formattedcode/data/common/manifests-expected.yaml +++ b/tests/formattedcode/data/common/manifests-expected.yaml @@ -466,33 +466,207 @@ license_detections: - identifier: apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8 license_expression: apache-2.0 detection_count: 3 + sample_matches: + - score: '100.0' + from_file: manifests/npm-license-mapping/package.json + start_line: 20 + end_line: 20 + matched_length: 3 + match_coverage: '100.0' + matcher: 2-aho + license_expression: apache-2.0 + rule_identifier: spdx_license_id_apache-2.0_for_apache-2.0.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE + matched_text: ' "type": "Apache 2.0",' - identifier: apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0 license_expression: apache-2.0 detection_count: 1 + sample_matches: + - score: '100.0' + from_file: manifests/npm-license-mapping/package.json + start_line: 6 + end_line: 6 + matched_length: 4 + match_coverage: '100.0' + matcher: 2-aho + license_expression: apache-2.0 + rule_identifier: apache-2.0_65.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE + matched_text: ' "license": "Apache-2.0",' - identifier: cddl_1_0-c6dbef4d-659c-289f-5ee9-1ca0278edad6 license_expression: cddl-1.0 detection_count: 1 + sample_matches: + - score: '16.0' + from_file: manifests/maven/persistence-api-1.0.pom + start_line: 17 + end_line: '19' + matched_length: 3 + match_coverage: '100.0' + matcher: 2-aho + license_expression: unknown-license-reference + rule_identifier: license-intro_72.RULE + rule_relevance: 16 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_72.RULE + matched_text: | + + + Common Development and Distribution License (CDDL) v1.0 + - score: '82.35' + from_file: manifests/maven/persistence-api-1.0.pom + start_line: 18 + end_line: 20 + matched_length: 14 + match_coverage: '82.35' + matcher: 3-seq + license_expression: cddl-1.0 + rule_identifier: cddl-1.0_32.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cddl-1.0_32.RULE + matched_text: | + + Common Development and Distribution License (CDDL) v1.0 + http://www.sun.com/cddl/cddl.html - identifier: cddl_1_0-dd3dd7df-afca-6a5e-492c-f7b279fdd880 license_expression: cddl-1.0 detection_count: 1 + sample_matches: + - score: '100.0' + from_file: manifests/maven/persistence-api-1.0.pom + start_line: 1 + end_line: 1 + matched_length: 8 + match_coverage: '100.0' + matcher: 2-aho + license_expression: cddl-1.0 + rule_identifier: cddl-1.0.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cddl-1.0.RULE + matched_text: '- name: Common Development and Distribution License (CDDL) v1.0' + - score: '100.0' + from_file: manifests/maven/persistence-api-1.0.pom + start_line: 2 + end_line: 2 + matched_length: 7 + match_coverage: '100.0' + matcher: 2-aho + license_expression: cddl-1.0 + rule_identifier: cddl-1.0_4.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cddl-1.0_4.RULE + matched_text: ' url: http://www.sun.com/cddl/cddl.html' - identifier: lgpl_3_0-272571eb-5e68-95b6-ddb0-71de2d8df321 license_expression: lgpl-3.0 detection_count: 2 + sample_matches: + - score: '100.0' + from_file: manifests/pypi/bluepyopt_setup.py + start_line: 74 + end_line: 75 + matched_length: 10 + match_coverage: '100.0' + matcher: 2-aho + license_expression: lgpl-3.0 + rule_identifier: pypi_gnu_lesser_general_public_license_v3.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_gnu_lesser_general_public_license_v3.RULE + matched_text: | + 'License :: OSI Approved :: GNU Lesser General Public ' + 'License v3 (LGPLv3)', - identifier: lgpl_3_0-121be3c2-9c80-df84-d3da-8f674e4125c0 license_expression: lgpl-3.0 detection_count: 1 + sample_matches: + - score: '100.0' + from_file: manifests/pypi/bluepyopt_setup.py + start_line: 9 + end_line: 20 + matched_length: 106 + match_coverage: '100.0' + matcher: 2-aho + license_expression: lgpl-3.0 + rule_identifier: lgpl-3.0_276.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_276.RULE + matched_text: | + This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License version 3.0 as published + by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + details. + + You should have received a copy of the GNU Lesser General Public License + along with this library; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - identifier: lgpl_3_0-2db87bcf-56b4-9d7d-7075-2effae31c631 license_expression: lgpl-3.0 detection_count: 1 + sample_matches: + - score: '100.0' + from_file: manifests/pypi/bluepyopt_setup.py + start_line: 65 + end_line: 65 + matched_length: 2 + match_coverage: '100.0' + matcher: 2-aho + license_expression: lgpl-3.0 + rule_identifier: lgpl-3.0_152.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_152.RULE + matched_text: ' license="LGPLv3",' - identifier: lgpl_3_0-38174920-e8ed-7bda-41ec-94df7380b7d5 license_expression: lgpl-3.0 detection_count: 1 + sample_matches: + - score: '100.0' + from_file: manifests/pypi/bluepyopt_setup.py + start_line: 1 + end_line: 1 + matched_length: 1 + match_coverage: '100.0' + matcher: 1-hash + license_expression: lgpl-3.0 + rule_identifier: lgpl-3.0_29.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE + matched_text: LGPLv3 - identifier: mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee license_expression: mit detection_count: 1 + sample_matches: + - score: '100.0' + from_file: manifests/npm-license-string/package.json + start_line: 4 + end_line: 4 + matched_length: 2 + match_coverage: '100.0' + matcher: 2-aho + license_expression: mit + rule_identifier: mit_30.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE + matched_text: ' "license": "MIT",' - identifier: mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf license_expression: mit detection_count: 1 + sample_matches: + - score: '100.0' + from_file: manifests/npm-license-string/package.json + start_line: 1 + end_line: 1 + matched_length: 1 + match_coverage: '100.0' + matcher: 1-spdx-id + license_expression: mit + rule_identifier: spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06 + rule_relevance: 100 + rule_url: + matched_text: MIT license_references: - key: apache-2.0 language: en diff --git a/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml b/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml index 408814a51b0..3d99d8fab81 100644 --- a/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml +++ b/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml @@ -123,18 +123,251 @@ license_detections: - identifier: apache_2_0-ab23f79b-ec38-9a8a-9b23-85059407f34d license_expression: apache-2.0 detection_count: 1 + sample_matches: + - score: '100.0' + from_file: package-and-licenses/apache-2.0.LICENSE + start_line: 2 + end_line: 202 + matched_length: 1584 + match_coverage: '100.0' + matcher: 1-hash + license_expression: apache-2.0 + rule_identifier: apache-2.0.LICENSE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE + matched_text: " Apache License\n \ + \ Version 2.0, January 2004\n http://www.apache.org/licenses/\n\ + \ \n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n \n 1. Definitions.\n\ + \ \n \"License\" shall mean the terms and conditions for use, reproduction,\n\ + \ and distribution as defined by Sections 1 through 9 of this document.\n \n\ + \ \"Licensor\" shall mean the copyright owner or entity authorized by\n \ + \ the copyright owner that is granting the License.\n \n \"Legal Entity\" shall\ + \ mean the union of the acting entity and all\n other entities that control,\ + \ are controlled by, or are under common\n control with that entity. For the\ + \ purposes of this definition,\n \"control\" means (i) the power, direct or indirect,\ + \ to cause the\n direction or management of such entity, whether by contract\ + \ or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n \ + \ outstanding shares, or (iii) beneficial ownership of such entity.\n \n \ + \ \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising\ + \ permissions granted by this License.\n \n \"Source\" form shall mean the preferred\ + \ form for making modifications,\n including but not limited to software source\ + \ code, documentation\n source, and configuration files.\n \n \"Object\"\ + \ form shall mean any form resulting from mechanical\n transformation or translation\ + \ of a Source form, including but\n not limited to compiled object code, generated\ + \ documentation,\n and conversions to other media types.\n \n \"Work\" shall\ + \ mean the work of authorship, whether in Source or\n Object form, made available\ + \ under the License, as indicated by a\n copyright notice that is included in\ + \ or attached to the work\n (an example is provided in the Appendix below).\n\ + \ \n \"Derivative Works\" shall mean any work, whether in Source or Object\n\ + \ form, that is based on (or derived from) the Work and for which the\n \ + \ editorial revisions, annotations, elaborations, or other modifications\n represent,\ + \ as a whole, an original work of authorship. For the purposes\n of this License,\ + \ Derivative Works shall not include works that remain\n separable from, or merely\ + \ link (or bind by name) to the interfaces of,\n the Work and Derivative Works\ + \ thereof.\n \n \"Contribution\" shall mean any work of authorship, including\n\ + \ the original version of the Work and any modifications or additions\n \ + \ to that Work or Derivative Works thereof, that is intentionally\n submitted\ + \ to Licensor for inclusion in the Work by the copyright owner\n or by an individual\ + \ or Legal Entity authorized to submit on behalf of\n the copyright owner. For\ + \ the purposes of this definition, \"submitted\"\n means any form of electronic,\ + \ verbal, or written communication sent\n to the Licensor or its representatives,\ + \ including but not limited to\n communication on electronic mailing lists, source\ + \ code control systems,\n and issue tracking systems that are managed by, or\ + \ on behalf of, the\n Licensor for the purpose of discussing and improving the\ + \ Work, but\n excluding communication that is conspicuously marked or otherwise\n\ + \ designated in writing by the copyright owner as \"Not a Contribution.\"\n \n\ + \ \"Contributor\" shall mean Licensor and any individual or Legal Entity\n \ + \ on behalf of whom a Contribution has been received by Licensor and\n subsequently\ + \ incorporated within the Work.\n \n 2. Grant of Copyright License. Subject to the\ + \ terms and conditions of\n this License, each Contributor hereby grants to You\ + \ a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n\ + \ copyright license to reproduce, prepare Derivative Works of,\n publicly\ + \ display, publicly perform, sublicense, and distribute the\n Work and such Derivative\ + \ Works in Source or Object form.\n \n 3. Grant of Patent License. Subject to the\ + \ terms and conditions of\n this License, each Contributor hereby grants to You\ + \ a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n\ + \ (except as stated in this section) patent license to make, have made,\n \ + \ use, offer to sell, sell, import, and otherwise transfer the Work,\n where\ + \ such license applies only to those patent claims licensable\n by such Contributor\ + \ that are necessarily infringed by their\n Contribution(s) alone or by combination\ + \ of their Contribution(s)\n with the Work to which such Contribution(s) was\ + \ submitted. If You\n institute patent litigation against any entity (including\ + \ a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n \ + \ or a Contribution incorporated within the Work constitutes direct\n or contributory\ + \ patent infringement, then any patent licenses\n granted to You under this License\ + \ for that Work shall terminate\n as of the date such litigation is filed.\n\ + \ \n 4. Redistribution. You may reproduce and distribute copies of the\n Work\ + \ or Derivative Works thereof in any medium, with or without\n modifications,\ + \ and in Source or Object form, provided that You\n meet the following conditions:\n\ + \ \n (a) You must give any other recipients of the Work or\n Derivative\ + \ Works a copy of this License; and\n \n (b) You must cause any modified files\ + \ to carry prominent notices\n stating that You changed the files; and\n\ + \ \n (c) You must retain, in the Source form of any Derivative Works\n \ + \ that You distribute, all copyright, patent, trademark, and\n attribution\ + \ notices from the Source form of the Work,\n excluding those notices that\ + \ do not pertain to any part of\n the Derivative Works; and\n \n (d)\ + \ If the Work includes a \"NOTICE\" text file as part of its\n distribution,\ + \ then any Derivative Works that You distribute must\n include a readable\ + \ copy of the attribution notices contained\n within such NOTICE file, excluding\ + \ those notices that do not\n pertain to any part of the Derivative Works,\ + \ in at least one\n of the following places: within a NOTICE text file distributed\n\ + \ as part of the Derivative Works; within the Source form or\n documentation,\ + \ if provided along with the Derivative Works; or,\n within a display generated\ + \ by the Derivative Works, if and\n wherever such third-party notices normally\ + \ appear. The contents\n of the NOTICE file are for informational purposes\ + \ only and\n do not modify the License. You may add Your own attribution\n\ + \ notices within Derivative Works that You distribute, alongside\n \ + \ or as an addendum to the NOTICE text from the Work, provided\n that\ + \ such additional attribution notices cannot be construed\n as modifying\ + \ the License.\n \n You may add Your own copyright statement to Your modifications\ + \ and\n may provide additional or different license terms and conditions\n \ + \ for use, reproduction, or distribution of Your modifications, or\n for any\ + \ such Derivative Works as a whole, provided Your use,\n reproduction, and distribution\ + \ of the Work otherwise complies with\n the conditions stated in this License.\n\ + \ \n 5. Submission of Contributions. Unless You explicitly state otherwise,\n \ + \ any Contribution intentionally submitted for inclusion in the Work\n by\ + \ You to the Licensor shall be under the terms and conditions of\n this License,\ + \ without any additional terms or conditions.\n Notwithstanding the above, nothing\ + \ herein shall supersede or modify\n the terms of any separate license agreement\ + \ you may have executed\n with Licensor regarding such Contributions.\n \n \ + \ 6. Trademarks. This License does not grant permission to use the trade\n names,\ + \ trademarks, service marks, or product names of the Licensor,\n except as required\ + \ for reasonable and customary use in describing the\n origin of the Work and\ + \ reproducing the content of the NOTICE file.\n \n 7. Disclaimer of Warranty. Unless\ + \ required by applicable law or\n agreed to in writing, Licensor provides the\ + \ Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n\ + \ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied,\ + \ including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT,\ + \ MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible\ + \ for determining the\n appropriateness of using or redistributing the Work and\ + \ assume any\n risks associated with Your exercise of permissions under this\ + \ License.\n \n 8. Limitation of Liability. In no event and under no legal theory,\n\ + \ whether in tort (including negligence), contract, or otherwise,\n unless\ + \ required by applicable law (such as deliberate and grossly\n negligent acts)\ + \ or agreed to in writing, shall any Contributor be\n liable to You for damages,\ + \ including any direct, indirect, special,\n incidental, or consequential damages\ + \ of any character arising as a\n result of this License or out of the use or\ + \ inability to use the\n Work (including but not limited to damages for loss\ + \ of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n\ + \ other commercial damages or losses), even if such Contributor\n has been\ + \ advised of the possibility of such damages.\n \n 9. Accepting Warranty or Additional\ + \ Liability. While redistributing\n the Work or Derivative Works thereof, You\ + \ may choose to offer,\n and charge a fee for, acceptance of support, warranty,\ + \ indemnity,\n or other liability obligations and/or rights consistent with this\n\ + \ License. However, in accepting such obligations, You may act only\n on\ + \ Your own behalf and on Your sole responsibility, not on behalf\n of any other\ + \ Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor\ + \ harmless for any liability\n incurred by, or claims asserted against, such\ + \ Contributor by reason\n of your accepting any such warranty or additional liability.\n\ + \ \n END OF TERMS AND CONDITIONS\n \n APPENDIX: How to apply the Apache License\ + \ to your work.\n \n To apply the Apache License to your work, attach the following\n\ + \ boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced\ + \ with your own identifying information. (Don't include\n the brackets!) The\ + \ text should be enclosed in the appropriate\n comment syntax for the file format.\ + \ We also recommend that a\n file or class name and description of purpose be\ + \ included on the\n same \"printed page\" as the copyright notice for easier\n\ + \ identification within third-party archives.\n \n Copyright [yyyy] [name of\ + \ copyright owner]\n \n Licensed under the Apache License, Version 2.0 (the \"License\"\ + );\n you may not use this file except in compliance with the License.\n You may\ + \ obtain a copy of the License at\n \n http://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,\n WITHOUT WARRANTIES OR\ + \ CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific\ + \ language governing permissions and\n limitations under the License." - identifier: apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8 license_expression: apache-2.0 detection_count: 1 + sample_matches: + - score: '100.0' + from_file: package-and-licenses/setup.cfg + start_line: 1 + end_line: 1 + matched_length: 3 + match_coverage: '100.0' + matcher: 1-hash + license_expression: apache-2.0 + rule_identifier: spdx_license_id_apache-2.0_for_apache-2.0.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE + matched_text: Apache-2.0 - identifier: apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0 license_expression: apache-2.0 detection_count: 1 + sample_matches: + - score: '100.0' + from_file: package-and-licenses/setup.cfg + start_line: 4 + end_line: 4 + matched_length: 4 + match_coverage: '100.0' + matcher: 2-aho + license_expression: apache-2.0 + rule_identifier: apache-2.0_65.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE + matched_text: license = Apache-2.0 - identifier: apache_2_0_and__apache_2_0_or_mit-9b638e72-e872-a67f-3447-eec297ef7b39 license_expression: apache-2.0 AND (apache-2.0 OR mit) detection_count: 1 + sample_matches: + - score: '80.0' + from_file: package-and-licenses/README.txt + start_line: 3 + end_line: 3 + matched_length: 4 + match_coverage: '100.0' + matcher: 2-aho + license_expression: apache-2.0 + rule_identifier: apache-2.0_73.RULE + rule_relevance: 80 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_73.RULE + matched_text: This is licensed under Apache-2.0 or MIT + - score: '100.0' + from_file: package-and-licenses/README.txt + start_line: 3 + end_line: 3 + matched_length: 5 + match_coverage: '100.0' + matcher: 2-aho + license_expression: apache-2.0 OR mit + rule_identifier: apache-2.0_or_mit_36.RULE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE + matched_text: This is licensed under Apache-2.0 or MIT - identifier: mit-cacd5c0c-204a-85c2-affc-e4c125b2492a license_expression: mit detection_count: 1 + sample_matches: + - score: '100.0' + from_file: package-and-licenses/mit.LICENSE + start_line: 2 + end_line: '19' + matched_length: 161 + match_coverage: '100.0' + matcher: 1-hash + license_expression: mit + rule_identifier: mit.LICENSE + rule_relevance: 100 + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE + matched_text: | + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. license_references: - key: apache-2.0 language: en diff --git a/tests/licensedcode/data/additional_licenses/additional_license_combined_test.expected.json b/tests/licensedcode/data/additional_licenses/additional_license_combined_test.expected.json index 94cc30b044f..bffb2a81ae0 100644 --- a/tests/licensedcode/data/additional_licenses/additional_license_combined_test.expected.json +++ b/tests/licensedcode/data/additional_licenses/additional_license_combined_test.expected.json @@ -3,7 +3,79 @@ { "identifier": "example_installed_1_and_example_installed_2_and_example1_and_example2_and_apache_2_0-cfa2fe66-d37a-6bee-465f-3d11802e1c1d", "license_expression": "example-installed-1 AND example-installed-2 AND example1 AND example2 AND apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "additional_license_combined_test.txt", + "start_line": 1, + "end_line": 1, + "matched_length": 11, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "example-installed-1", + "rule_identifier": "example-installed-1.LICENSE", + "rule_relevance": 100, + "rule_url": null, + "matched_text": null + }, + { + "score": 100.0, + "from_file": "additional_license_combined_test.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "example-installed-2", + "rule_identifier": "example-installed-2.LICENSE", + "rule_relevance": 100, + "rule_url": null, + "matched_text": null + }, + { + "score": 100.0, + "from_file": "additional_license_combined_test.txt", + "start_line": 5, + "end_line": 5, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "example1", + "rule_identifier": "example1.LICENSE", + "rule_relevance": 100, + "rule_url": null, + "matched_text": null + }, + { + "score": 100.0, + "from_file": "additional_license_combined_test.txt", + "start_line": 5, + "end_line": 9, + "matched_length": 69, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "example2", + "rule_identifier": "example2.LICENSE", + "rule_relevance": 100, + "rule_url": null, + "matched_text": null + }, + { + "score": 100.0, + "from_file": "additional_license_combined_test.txt", + "start_line": 12, + "end_line": 12, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] } ], "license_references": [ diff --git a/tests/licensedcode/data/additional_licenses/additional_license_directory_test.expected.json b/tests/licensedcode/data/additional_licenses/additional_license_directory_test.expected.json index d094e94c092..1e4923eb95a 100644 --- a/tests/licensedcode/data/additional_licenses/additional_license_directory_test.expected.json +++ b/tests/licensedcode/data/additional_licenses/additional_license_directory_test.expected.json @@ -3,7 +3,37 @@ { "identifier": "example1_and_example2-f86ebb61-26dd-be05-2a61-01d7b630ba62", "license_expression": "example1 AND example2", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "additional_license_directory_test.txt", + "start_line": 1, + "end_line": 1, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "example1", + "rule_identifier": "example1.LICENSE", + "rule_relevance": 100, + "rule_url": null, + "matched_text": null + }, + { + "score": 100.0, + "from_file": "additional_license_directory_test.txt", + "start_line": 1, + "end_line": 5, + "matched_length": 69, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "example2", + "rule_identifier": "example2.LICENSE", + "rule_relevance": 100, + "rule_url": null, + "matched_text": null + } + ] } ], "license_references": [ diff --git a/tests/licensedcode/data/additional_licenses/additional_license_plugin_test.expected.json b/tests/licensedcode/data/additional_licenses/additional_license_plugin_test.expected.json index 2814039c2ad..341dd389d9e 100644 --- a/tests/licensedcode/data/additional_licenses/additional_license_plugin_test.expected.json +++ b/tests/licensedcode/data/additional_licenses/additional_license_plugin_test.expected.json @@ -3,7 +3,23 @@ { "identifier": "example_installed_1-ec26d04a-f591-6524-a28f-b2c6b6d5086a", "license_expression": "example-installed-1", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "additional_license_plugin_test.txt", + "start_line": 1, + "end_line": 1, + "matched_length": 11, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "example-installed-1", + "rule_identifier": "example-installed-1.LICENSE", + "rule_relevance": 100, + "rule_url": null, + "matched_text": null + } + ] } ], "license_references": [ diff --git a/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json b/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json index cbc12559974..3fbca23dba4 100644 --- a/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json +++ b/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json @@ -4,13 +4,45 @@ "identifier": "bsd_new-35c287f1-5d41-52f8-399e-2391cd1b4b40", "license_expression": "bsd-new", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 397, + "end_line": 419, + "matched_length": 213, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_943.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_943.RULE", + "matched_text": "Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of the University nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE." + } + ] }, { "identifier": "bsd_new-ccc98c3a-92d4-e7a3-e0ba-798328cb6b98", "license_expression": "bsd-new", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 369, + "end_line": 391, + "matched_length": 213, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_19.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_19.RULE", + "matched_text": "Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of the University nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE." + } + ] }, { "identifier": "bzip2_libbzip_2010-7158bcb2-a4d7-9815-17d2-1b1d0a6d5de2", @@ -18,13 +50,59 @@ "detection_count": 1, "detection_log": [ "unknown-intro-followed-by-match" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 274, + "end_line": 274, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "license-intro_50.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_50.RULE", + "matched_text": "is licensed under the following terms:" + }, + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 281, + "end_line": 310, + "matched_length": 233, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bzip2-libbzip-2010", + "rule_identifier": "bzip2-libbzip-2010.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/bzip2-libbzip-2010.LICENSE", + "matched_text": "Redistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n2. The origin of this software must not be misrepresented; you must \n not claim that you wrote the original software. If you use this \n software in a product, an acknowledgment in the product \n documentation would be appreciated but is not required.\n\n3. Altered source versions must be plainly marked as such, and must\n not be misrepresented as being the original software.\n\n4. The name of the author may not be used to endorse or promote \n products derived from this software without specific prior written \n permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\nOR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\nGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\nWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + } ] }, { "identifier": "openssl-e1da0b01-fab9-e27d-4ff3-c4944b09b621", "license_expression": "openssl", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 440, + "end_line": 487, + "matched_length": 332, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "openssl", + "rule_identifier": "openssl_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/openssl_1.RULE", + "matched_text": "Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer. \n *\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in\n * the documentation and/or other materials provided with the\n * distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n * software must display the following acknowledgment:\n * \"This product includes software developed by the OpenSSL Project\n * for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n * endorse or promote products derived from this software without\n * prior written permission. For written permission, please contact\n * openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n * nor may \"OpenSSL\" appear in their names without prior written\n * permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n * acknowledgment:\n * \"This product includes software developed by the OpenSSL Project\n * for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com). This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com)." + } + ] }, { "identifier": "openssl_ssleay-238ad05e-bfde-df4c-6b5b-61ef3ec16843", @@ -32,25 +110,229 @@ "detection_count": 1, "detection_log": [ "unknown-intro-followed-by-match" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 422, + "end_line": 422, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "license-intro_50.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_50.RULE", + "matched_text": "is licensed under the following terms:" + }, + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 428, + "end_line": 432, + "matched_length": 56, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "openssl-ssleay", + "rule_identifier": "openssl-ssleay_43.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/openssl-ssleay_43.RULE", + "matched_text": "The OpenSSL toolkit stays under a dual license, i.e. both the conditions of\n the OpenSSL License and the original SSLeay license apply to the toolkit.\n See below for the actual license texts. Actually both licenses are BSD-style\n Open Source licenses. In case of any license issues related to OpenSSL\n please contact openssl-core@openssl.org." + }, + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 434, + "end_line": 434, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "openssl-ssleay", + "rule_identifier": "openssl-ssleay_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/openssl-ssleay_2.RULE", + "matched_text": "OpenSSL License" + } ] }, { "identifier": "other_copyleft_and_gpl_1_0_plus-2a634b9a-02ad-d5b9-47fc-e91c5eb24808", "license_expression": "other-copyleft AND gpl-1.0-plus", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 80.0, + "from_file": "python.LICENSE", + "start_line": 62, + "end_line": 62, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "other-copyleft", + "rule_identifier": "other-copyleft_24.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/other-copyleft_24.RULE", + "matched_text": "GPL-compatible" + }, + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 62, + "end_line": 63, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_200.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_200.RULE", + "matched_text": "under\n the GPL." + }, + { + "score": 85.0, + "from_file": "python.LICENSE", + "start_line": 63, + "end_line": 63, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_351.RULE", + "rule_relevance": 85, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_351.RULE", + "matched_text": "the GPL," + }, + { + "score": 85.0, + "from_file": "python.LICENSE", + "start_line": 64, + "end_line": 65, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_351.RULE", + "rule_relevance": 85, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_351.RULE", + "matched_text": "The\n GPL-" + }, + { + "score": 80.0, + "from_file": "python.LICENSE", + "start_line": 65, + "end_line": 65, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "other-copyleft", + "rule_identifier": "other-copyleft_24.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/other-copyleft_24.RULE", + "matched_text": "GPL-compatible" + }, + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 66, + "end_line": 66, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_194.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_194.RULE", + "matched_text": "released under the GPL;" + }, + { + "score": 80.0, + "from_file": "python.LICENSE", + "start_line": 68, + "end_line": 68, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "other-copyleft", + "rule_identifier": "other-copyleft_24.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/other-copyleft_24.RULE", + "matched_text": "GPL-compatible," + }, + { + "score": 85.0, + "from_file": "python.LICENSE", + "start_line": 71, + "end_line": 71, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_351.RULE", + "rule_relevance": 85, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_351.RULE", + "matched_text": "the GPL." + } + ] }, { "identifier": "python-c496ccae-69a0-c5f8-a742-83bcd66bfe68", "license_expression": "python", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 23, + "end_line": 26, + "matched_length": 35, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "python", + "rule_identifier": "python_not_not-a-license_269.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/python_not_not-a-license_269.RULE", + "matched_text": "All Python releases are Open Source (see http://www.opensource.org for\nthe Open Source Definition). Historically, most, but not all, Python\nreleases have also been GPL-compatible; the table below summarizes\nthe various releases." + } + ] }, { "identifier": "python_and_python_cwi-dda7296c-6bc9-a87c-6fcd-8aa47c3484dc", "license_expression": "python AND python-cwi", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 90.52, + "from_file": "python.LICENSE", + "start_line": 77, + "end_line": 255, + "matched_length": 1385, + "match_coverage": 90.52, + "matcher": "3-seq", + "license_expression": "python", + "rule_identifier": "python_2019.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/python_2019.RULE", + "matched_text": "B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON\n===============================================================\n\nPYTHON SOFTWARE FOUNDATION LICENSE VERSION 2\n--------------------------------------------\n\n1. This LICENSE AGREEMENT is between the Python Software Foundation\n(\"PSF\"), and the Individual or Organization (\"Licensee\") accessing and\notherwise using this software (\"Python\") in source or binary form and\nits associated documentation.\n\n2. Subject to the terms and conditions of this License Agreement, PSF\nhereby grants Licensee a nonexclusive, royalty-free, world-wide\nlicense to reproduce, analyze, test, perform and/or display publicly,\nprepare derivative works, distribute, and otherwise use Python\nalone or in any derivative version, provided, however, that PSF's\nLicense Agreement and PSF's notice of copyright, i.e., \"Copyright (c)\n[2001], [2002], [2003], [2004], [2005], [2006], [2007], [2008] Python Software Foundation; \nAll Rights Reserved\" are retained in Python alone or in any derivative \nversion prepared by Licensee.\n\n3. In the event Licensee prepares a derivative work that is based on\nor incorporates Python or any part thereof, and wants to make\nthe derivative work available to others as provided herein, then\nLicensee hereby agrees to include in any such work a brief summary of\nthe changes made to Python.\n\n4. PSF is making Python available to Licensee on an \"AS IS\"\nbasis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\nIMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND\nDISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\nFOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT\nINFRINGE ANY THIRD PARTY RIGHTS.\n\n5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON\nFOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS\nA RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,\nOR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\n\n6. This License Agreement will automatically terminate upon a material\nbreach of its terms and conditions.\n\n7. Nothing in this License Agreement shall be deemed to create any\nrelationship of agency, partnership, or joint venture between PSF and\nLicensee. This License Agreement does not grant permission to use PSF\ntrademarks or trade name in a trademark sense to endorse or promote\nproducts or services of Licensee, or any third party.\n\n8. By copying, installing or otherwise using Python, Licensee\nagrees to be bound by the terms and conditions of this License\nAgreement.\n\n\nBEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0\n-------------------------------------------\n\nBEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1\n\n1. This LICENSE AGREEMENT is between BeOpen.com (\"BeOpen\"), having an\noffice at 160 Saratoga Avenue, Santa Clara, CA 95051, and the\nIndividual or Organization (\"Licensee\") accessing and otherwise using\nthis software in source or binary form and its associated\ndocumentation (\"the Software\").\n\n2. Subject to the terms and conditions of this BeOpen Python License\nAgreement, BeOpen hereby grants Licensee a non-exclusive,\nroyalty-free, world-wide license to reproduce, analyze, test, perform\nand/or display publicly, prepare derivative works, distribute, and\notherwise use the Software alone or in any derivative version,\nprovided, however, that the BeOpen Python License is retained in the\nSoftware, alone or in any derivative version prepared by Licensee.\n\n3. BeOpen is making the Software available to Licensee on an \"AS IS\"\nbasis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\nIMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND\nDISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\nFOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT\nINFRINGE ANY THIRD PARTY RIGHTS.\n\n4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE\nSOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS\nAS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY\nDERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\n\n5. This License Agreement will automatically terminate upon a material\nbreach of its terms and conditions.\n\n6. This License Agreement shall be governed by and interpreted in all\nrespects by the law of the State of California, excluding conflict of\nlaw provisions. Nothing in this License Agreement shall be deemed to\ncreate any relationship of agency, partnership, or joint venture\nbetween BeOpen and Licensee. This License Agreement does not grant\npermission to use BeOpen trademarks or trade names in a trademark\nsense to endorse or promote products or services of Licensee, or any\nthird party. As an exception, the \"BeOpen Python\" logos available at\nhttp://www.pythonlabs.com/logos.html may be used according to the\npermissions granted on that web page.\n\n7. By copying, installing or otherwise using the software, Licensee\nagrees to be bound by the terms and conditions of this License\nAgreement.\n\n\nCNRI LICENSE AGREEMENT FOR PYTHON 1.6.1\n---------------------------------------\n\n1. This LICENSE AGREEMENT is between the Corporation for National\nResearch Initiatives, having an office at 1895 Preston White Drive,\nReston, VA 20191 (\"CNRI\"), and the Individual or Organization\n(\"Licensee\") accessing and otherwise using Python 1.6.1 software in\nsource or binary form and its associated documentation.\n\n2. Subject to the terms and conditions of this License Agreement, CNRI\nhereby grants Licensee a nonexclusive, royalty-free, world-wide\nlicense to reproduce, analyze, test, perform and/or display publicly,\nprepare derivative works, distribute, and otherwise use Python 1.6.1\nalone or in any derivative version, provided, however, that CNRI's\nLicense Agreement and CNRI's notice of copyright, i.e., \"Copyright (c)\n1995-2001 Corporation for National Research Initiatives; All Rights\nReserved\" are retained in Python 1.6.1 alone or in any derivative\nversion prepared by Licensee. Alternately, in lieu of CNRI's License\nAgreement, Licensee may substitute the following text (omitting the\nquotes): \"Python 1.6.1 is made available subject to the terms and\nconditions in CNRI's License Agreement. This Agreement together with\nPython 1.6.1 may be located on the Internet using the following\nunique, persistent identifier (known as a handle): 1895.22/1013. This\nAgreement may also be obtained from a proxy server on the Internet\nusing the following URL: http://hdl.handle.net/1895.22/1013\".\n\n3. In the event Licensee prepares a derivative work that is based on\nor incorporates Python 1.6.1 or any part thereof, and wants to make\nthe derivative work available to others as provided herein, then\nLicensee hereby agrees to include in any such work a brief summary of\nthe changes made to Python 1.6.1.\n\n4. CNRI is making Python 1.6.1 available to Licensee on an \"AS IS\"\nbasis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\nIMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND\nDISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\nFOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT\nINFRINGE ANY THIRD PARTY RIGHTS.\n\n5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON\n1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS\nA RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,\nOR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\n\n6. This License Agreement will automatically terminate upon a material\nbreach of its terms and conditions.\n\n7. This License Agreement shall be governed by the federal\nintellectual property law of the United States, including without\nlimitation the federal copyright law, and, to the extent such\nU.S. federal law does not apply, by the law of the Commonwealth of\nVirginia, excluding Virginia's conflict of law provisions.\nNotwithstanding the foregoing, with regard to derivative works based\non Python 1.6.1 that incorporate non-separable material that was\npreviously distributed under the GNU General Public License (GPL), the\nlaw of the Commonwealth of Virginia shall govern this License\nAgreement only as to issues arising under or with respect to\nParagraphs 4, 5, and 7 of this License Agreement. Nothing in this\nLicense Agreement shall be deemed to create any relationship of\nagency, partnership, or joint venture between CNRI and Licensee. This\nLicense Agreement does not grant permission to use CNRI trademarks or\ntrade name in a trademark sense to endorse or promote products or\nservices of Licensee, or any third party.\n\n8. By clicking on the \"ACCEPT\" button where indicated, or by copying,\ninstalling or otherwise using Python 1.6.1, Licensee agrees to be\nbound by the terms and conditions of this License Agreement.\n\n ACCEPT\n\n\nCWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\n--------------------------------------------------\n\nCopyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,\nThe Netherlands. All rights reserved." + }, + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 257, + "end_line": 272, + "matched_length": 145, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "python-cwi", + "rule_identifier": "python-cwi.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/python-cwi.LICENSE", + "matched_text": "Permission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in\nsupporting documentation, and that the name of Stichting Mathematisch\nCentrum or CWI not be used in advertising or publicity pertaining to\ndistribution of the software without specific, written prior\npermission.\n\nSTICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO\nTHIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE\nFOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT\nOF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE." + } + ] }, { "identifier": "sleepycat-a7cd8833-ecc2-8ade-54d7-392befcce801", @@ -58,13 +340,59 @@ "detection_count": 1, "detection_log": [ "unknown-intro-followed-by-match" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 317, + "end_line": 317, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "license-intro_50.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_50.RULE", + "matched_text": "is licensed under the following terms:" + }, + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 334, + "end_line": 351, + "matched_length": 174, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "sleepycat", + "rule_identifier": "sleepycat_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/sleepycat_5.RULE", + "matched_text": "Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Redistributions in any form must be accompanied by information on\n * how to obtain complete source code for the DB software and any\n * accompanying software that uses the DB software. The source code\n * must either be included in the distribution or be available for no\n * more than the cost of distribution plus a nominal fee, and must be\n * freely redistributable under reasonable conditions. For an\n * executable file, complete source code means the source code for all\n * modules it contains. It does not include source code for modules or\n * files that typically accompany the major components of the operating\n * system on which the executable file runs." + } ] }, { "identifier": "ssleay_windows-d3dabc12-d861-87db-b339-f73beba8703a", "license_expression": "ssleay-windows", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 497, + "end_line": 548, + "matched_length": 453, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "ssleay-windows", + "rule_identifier": "ssleay-windows.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/ssleay-windows.LICENSE", + "matched_text": "This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n * \n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to. The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code. The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n * \n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n * must display the following acknowledgement:\n * \"This product includes cryptographic software written by\n * Eric Young (eay@cryptsoft.com)\"\n * The word 'cryptographic' can be left out if the rouines from the library\n * being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from \n * the apps directory (application code) you must include an acknowledgement:\n * \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n * \n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n * \n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed. i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]" + } + ] }, { "identifier": "tcl-75d8de8c-9cf0-d604-4b99-e03436ebfcd3", @@ -72,6 +400,36 @@ "detection_count": 1, "detection_log": [ "unknown-intro-followed-by-match" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 595, + "end_line": 595, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "license-intro_50.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_50.RULE", + "matched_text": "is licensed under the following terms:" + }, + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 597, + "end_line": 635, + "matched_length": 341, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "tcl", + "rule_identifier": "tcl_14.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/tcl_14.RULE", + "matched_text": "This software is copyrighted by the Regents of the University of\nCalifornia, Sun Microsystems, Inc., and other parties. The following\nterms apply to all files associated with the software unless explicitly\ndisclaimed in individual files.\n\nThe authors hereby grant permission to use, copy, modify, distribute,\nand license this software and its documentation for any purpose, provided\nthat existing copyright notices are retained in all copies and that this\nnotice is included verbatim in any distributions. No written agreement,\nlicense, or royalty fee is required for any of the authorized uses.\nModifications to this software may be copyrighted by their authors\nand need not follow the licensing terms described here, provided that\nthe new terms are clearly indicated on the first page of each file where\nthey apply.\n\nIN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY\nFOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES\nARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY\nDERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n\nTHE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,\nINCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE\nIS PROVIDED ON AN \"AS IS\" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE\nNO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR\nMODIFICATIONS.\n\nGOVERNMENT USE: If you are acquiring this software on behalf of the\nU.S. government, the Government shall have only \"Restricted Rights\"\nin the software and related documentation as defined in the Federal \nAcquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you\nare acquiring the software on behalf of the Department of Defense, the\nsoftware shall be classified as \"Commercial Computer Software\" and the\nGovernment shall have only \"Restricted Rights\" as defined in Clause\n252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the\nauthors grant the U.S. Government and others acting in its behalf\npermission to use and distribute the software in accordance with the\nterms specified in this license." + } ] }, { @@ -80,6 +438,36 @@ "detection_count": 1, "detection_log": [ "unknown-intro-followed-by-match" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 552, + "end_line": 552, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "license-intro_50.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_50.RULE", + "matched_text": "is licensed under the following terms:" + }, + { + "score": 100.0, + "from_file": "python.LICENSE", + "start_line": 554, + "end_line": 593, + "matched_length": 345, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "tcl", + "rule_identifier": "tcl.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/tcl.LICENSE", + "matched_text": "This software is copyrighted by the Regents of the University of\nCalifornia, Sun Microsystems, Inc., Scriptics Corporation, ActiveState\nCorporation and other parties. The following terms apply to all files\nassociated with the software unless explicitly disclaimed in\nindividual files.\n\nThe authors hereby grant permission to use, copy, modify, distribute,\nand license this software and its documentation for any purpose, provided\nthat existing copyright notices are retained in all copies and that this\nnotice is included verbatim in any distributions. No written agreement,\nlicense, or royalty fee is required for any of the authorized uses.\nModifications to this software may be copyrighted by their authors\nand need not follow the licensing terms described here, provided that\nthe new terms are clearly indicated on the first page of each file where\nthey apply.\n\nIN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY\nFOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES\nARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY\nDERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n\nTHE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,\nINCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE\nIS PROVIDED ON AN \"AS IS\" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE\nNO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR\nMODIFICATIONS.\n\nGOVERNMENT USE: If you are acquiring this software on behalf of the\nU.S. government, the Government shall have only \"Restricted Rights\"\nin the software and related documentation as defined in the Federal \nAcquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you\nare acquiring the software on behalf of the Department of Defense, the\nsoftware shall be classified as \"Commercial Computer Software\" and the\nGovernment shall have only \"Restricted Rights\" as defined in Clause\n252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the\nauthors grant the U.S. Government and others acting in its behalf\npermission to use and distribute the software in accordance with the\nterms specified in this license." + } ] } ], diff --git a/tests/licensedcode/data/licenses_reference_reporting/scan-matched-text-with-reference.expected.json b/tests/licensedcode/data/licenses_reference_reporting/scan-matched-text-with-reference.expected.json index c33a5082eed..7de5abe8534 100644 --- a/tests/licensedcode/data/licenses_reference_reporting/scan-matched-text-with-reference.expected.json +++ b/tests/licensedcode/data/licenses_reference_reporting/scan-matched-text-with-reference.expected.json @@ -87,19 +87,81 @@ "identifier": "apache_2_0_and__mit_or_bsd_simplified-a6ac74a7-7a5d-f78e-e6da-54ac6d836a93", "license_expression": "apache-2.0 AND (mit OR bsd-simplified)", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/copyr.java", + "start_line": 3, + "end_line": 16, + "matched_length": 119, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE", + "matched_text": "Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://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,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License." + }, + { + "score": 100.0, + "from_file": "scan/copyr.java", + "start_line": 19, + "end_line": 19, + "matched_length": 8, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit OR bsd-simplified", + "rule_identifier": "spdx-license-identifier-mit OR bsd-simplified-521d0523ce32cc52dd709e9fc653552931947808", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "SPDX-License-Identifier: MIT or BSD-2-Clause" + } + ] }, { "identifier": "artistic_2_0-c1ede1c6-eb3d-61cc-53ad-abba5e17c732", "license_expression": "artistic-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/package.json", + "start_line": 28, + "end_line": 28, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "artistic-2.0", + "rule_identifier": "artistic-2.0_46.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-2.0_46.RULE", + "matched_text": "license\": \"Artistic-2.0" + } + ] }, { "identifier": "artistic_2_0_or_mit-529b866b-c702-0328-8f33-363ba46b3370", "license_expression": "artistic-2.0 OR mit", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "artistic-2.0 OR mit", + "rule_identifier": "spdx-license-identifier-artistic-2.0 OR mit-512604ee8f4c8e5ccdd4631c2b447196299cd404", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "Artistic-2.0 OR MIT" + } + ] } ], "license_references": [ diff --git a/tests/licensedcode/data/licenses_reference_reporting/scan-with-reference.expected.json b/tests/licensedcode/data/licenses_reference_reporting/scan-with-reference.expected.json index d917b335753..75a817d8e2d 100644 --- a/tests/licensedcode/data/licenses_reference_reporting/scan-with-reference.expected.json +++ b/tests/licensedcode/data/licenses_reference_reporting/scan-with-reference.expected.json @@ -86,17 +86,79 @@ { "identifier": "apache_2_0_and__mit_or_bsd_simplified-a6ac74a7-7a5d-f78e-e6da-54ac6d836a93", "license_expression": "apache-2.0 AND (mit OR bsd-simplified)", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/copyr.java", + "start_line": 3, + "end_line": 16, + "matched_length": 119, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "scan/copyr.java", + "start_line": 19, + "end_line": 19, + "matched_length": 8, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit OR bsd-simplified", + "rule_identifier": "spdx-license-identifier-mit OR bsd-simplified-c8fa3f8aa8e5819b052e913ac9dec497534a442b", + "rule_relevance": 100, + "rule_url": null, + "matched_text": null + } + ] }, { "identifier": "artistic_2_0-c1ede1c6-eb3d-61cc-53ad-abba5e17c732", "license_expression": "artistic-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/package.json", + "start_line": 28, + "end_line": 28, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "artistic-2.0", + "rule_identifier": "artistic-2.0_46.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-2.0_46.RULE", + "matched_text": null + } + ] }, { "identifier": "artistic_2_0_or_mit-529b866b-c702-0328-8f33-363ba46b3370", "license_expression": "artistic-2.0 OR mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "artistic-2.0 OR mit", + "rule_identifier": "spdx-license-identifier-artistic-2.0 OR mit-512604ee8f4c8e5ccdd4631c2b447196299cd404", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "Artistic-2.0 OR MIT" + } + ] } ], "license_references": [ diff --git a/tests/licensedcode/data/match_spdx/scan-expected.json b/tests/licensedcode/data/match_spdx/scan-expected.json index b865283e6f3..0eaac5a9958 100644 --- a/tests/licensedcode/data/match_spdx/scan-expected.json +++ b/tests/licensedcode/data/match_spdx/scan-expected.json @@ -4,7 +4,23 @@ "identifier": "mit-86af397f-7fb9-6751-2e09-217685ce5b2a", "license_expression": "mit", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "license", + "start_line": 240, + "end_line": 240, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-158ab4758b53eeb6113d49d57f1d2a094ce67b5b", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "licenses.nuget.org/MIT\">MIT * */ /*" + } + ] } ], "files": [ diff --git a/tests/licensedcode/data/plugin_license/text_long_lines/scan.expected.json b/tests/licensedcode/data/plugin_license/text_long_lines/scan.expected.json index 3446170617b..b29c04006f4 100644 --- a/tests/licensedcode/data/plugin_license/text_long_lines/scan.expected.json +++ b/tests/licensedcode/data/plugin_license/text_long_lines/scan.expected.json @@ -4,13 +4,45 @@ "identifier": "gpl_2_0_with_linux_syscall_exception_gpl_or_linux_openib-c196bf1c-1c1f-18b4-554f-690be18bbad0", "license_expression": "gpl-2.0 WITH linux-syscall-exception-gpl OR linux-openib", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/gpl-2.0_with_linux-syscall-note_or_linux-openib_SPDX.RULE", + "start_line": 1, + "end_line": 1, + "matched_length": 13, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "gpl-2.0 WITH linux-syscall-exception-gpl OR linux-openib", + "rule_identifier": "spdx-license-identifier-gpl-2.0 WITH linux-syscall-exception-gpl OR linux-openib-40ad9110ec6551e97f55cd72b297773235a415e7", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-Openib) */" + } + ] }, { "identifier": "unlicense-5cac2dde-ce1c-ad2c-181b-a2b96eff3bab", "license_expression": "unlicense", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/tocbot.js", + "start_line": 89, + "end_line": 89, + "matched_length": 198, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unlicense", + "rule_identifier": "unlicense.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unlicense.LICENSE", + "matched_text": "This is free and unencumbered software released into the public domain. * * Anyone is free to copy, modify, publish, use, compile, sell, or * distribute this software, either in source code form or as a compiled * binary, for any purpose, commercial or non-commercial, and by any * means. * * In jurisdictions that recognize copyright laws, the author or authors * of this software dedicate any and all copyright interest in the * software to the public domain. We make this dedication for the benefit * of the public at large and to the detriment of our heirs and * successors. We intend this dedication to be an overt act of * relinquishment in perpetuity of all present and future rights to this * software under copyright law. * * THE SOFTWARE IS PROVIDED \\\"\nAS IS\\\", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * For more information, please refer to * */ /*" + } + ] } ], "files": [ diff --git a/tests/licensedcode/data/plugin_license/unknown_intro/scan-unknown-intro-dual-license.expected.json b/tests/licensedcode/data/plugin_license/unknown_intro/scan-unknown-intro-dual-license.expected.json index bb5cadd960e..314a513d83b 100644 --- a/tests/licensedcode/data/plugin_license/unknown_intro/scan-unknown-intro-dual-license.expected.json +++ b/tests/licensedcode/data/plugin_license/unknown_intro/scan-unknown-intro-dual-license.expected.json @@ -6,6 +6,64 @@ "detection_count": 1, "detection_log": [ "unknown-intro-followed-by-match" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan-unknown-intro-dual-license/README.md", + "start_line": 43, + "end_line": 43, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "lead-in_unknown_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lead-in_unknown_30.RULE", + "matched_text": "dual-licensed under [`" + }, + { + "score": 50.0, + "from_file": "scan-unknown-intro-dual-license/README.md", + "start_line": 43, + "end_line": 43, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "wtfpl-2.0", + "rule_identifier": "spdx_license_id_wtfpl_for_wtfpl-2.0.RULE", + "rule_relevance": 50, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_wtfpl_for_wtfpl-2.0.RULE", + "matched_text": "WTFPL`](" + }, + { + "score": 100.0, + "from_file": "scan-unknown-intro-dual-license/README.md", + "start_line": 43, + "end_line": 43, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "wtfpl-2.0", + "rule_identifier": "wtfpl-2.0_27.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/wtfpl-2.0_27.RULE", + "matched_text": "www.wtfpl.net/" + }, + { + "score": 100.0, + "from_file": "scan-unknown-intro-dual-license/README.md", + "start_line": 43, + "end_line": 43, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_64.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_64.RULE", + "matched_text": "MIT`](https://opensource.org/licenses/MIT)." + } ] } ], diff --git a/tests/licensedcode/data/plugin_license/unknown_intro/scan-unknown-intro-eclipse-foundation-tycho.expected.json b/tests/licensedcode/data/plugin_license/unknown_intro/scan-unknown-intro-eclipse-foundation-tycho.expected.json index 43fe1b8c8da..8aca7b9556f 100644 --- a/tests/licensedcode/data/plugin_license/unknown_intro/scan-unknown-intro-eclipse-foundation-tycho.expected.json +++ b/tests/licensedcode/data/plugin_license/unknown_intro/scan-unknown-intro-eclipse-foundation-tycho.expected.json @@ -4,61 +4,235 @@ "identifier": "apache_2_0-ec71f0b5-0d51-269d-4401-8cfe56a05bfe", "license_expression": "apache-2.0", "detection_count": 3, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan-unknown-intro-eclipse-foundation-tycho/about_2.html", + "start_line": 53, + "end_line": 54, + "matched_length": 51, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_1208.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1208.RULE", + "matched_text": "code is subject to the terms and conditions of the Apache Software License 2.0. A copy of the license is contained\nin the file LICENSE and is also available at http://www.apache.org/licenses/LICENSE-2.0.html\n\n
\nThis product includes software developed by the Apache Software Foundation (http://www.apache.org/LICENSE and is also available at http://www.apache.org/licenses/LICENSE-2.0.html.\n\n

The Apache attribution NOTICE file is included with the Content in accordance with 4d of the Apache License, Version 2.0.\n

\nBSD License"
+        }
+      ]
     },
     {
       "identifier": "bsd_new-90d0d4b4-f98b-d4da-dbb0-7e601f6d404a",
       "license_expression": "bsd-new",
       "detection_count": 1,
-      "detection_log": []
+      "detection_log": [],
+      "sample_matches": [
+        {
+          "score": 100.0,
+          "from_file": "scan-unknown-intro-eclipse-foundation-tycho/about_3.html",
+          "start_line": 64,
+          "end_line": 85,
+          "matched_length": 211,
+          "match_coverage": 100.0,
+          "matcher": "2-aho",
+          "license_expression": "bsd-new",
+          "rule_identifier": "bsd-new_860.RULE",
+          "rule_relevance": 100,
+          "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_860.RULE",
+          "matched_text": "Redistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this list of\nconditions and the following disclaimer. Redistributions in binary form must reproduce\nthe above copyright notice, this list of conditions and the following disclaimer in\nthe documentation and/or other materials provided with the distribution.\n\nNeither the name of Hamcrest nor the names of its contributors may be used to endorse\nor promote products derived from this software without specific prior written\npermission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\nSHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\nBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY\nWAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGE."
+        }
+      ]
     },
     {
       "identifier": "cpl_1_0-08dc5398-457d-49be-a798-b57fe4d8de3e",
       "license_expression": "cpl-1.0",
       "detection_count": 1,
-      "detection_log": []
+      "detection_log": [],
+      "sample_matches": [
+        {
+          "score": 100.0,
+          "from_file": "scan-unknown-intro-eclipse-foundation-tycho/about_4.html",
+          "start_line": 39,
+          "end_line": 41,
+          "matched_length": 60,
+          "match_coverage": 100.0,
+          "matcher": "2-aho",
+          "license_expression": "cpl-1.0",
+          "rule_identifier": "cpl-1.0_36.RULE",
+          "rule_relevance": 100,
+          "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cpl-1.0_36.RULE",
+          "matched_text": "source and binary code form contained in the plug-in is subject to the terms and conditions of the \nCommon Public License Version 1.0 ("CPL").  A copy of the CPL is available at https://www.eclipse.org/legal/cpl-v10.html.\n(a local copy can be found herehttps://www.eclipse.org/legal/cpl-v10.html\n\n

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise \nindicated below, the Content is provided to you under the terms and conditions of the\nEclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available \nat https://www.eclipse.org/legal/epl-v10.html.\nFor purposes of the EPL, "Program" will mean the Content.

\n\n

If you did not receive this Content directly from the Eclipse Foundation, the Content is \nbeing redistributed by another party ("Redistributor") and different terms and conditions may\napply to your use of any object code in the Content. Check the Redistributor's license that was \nprovided with the Content. If no such license exists, contact the Redistributor. Unless otherwise\nindicated below, the terms and conditions of the EPL still apply to any source code in the Content\nand such source code may be obtained at https://www.eclipse.org\n\n

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise \nindicated below, the Content is provided to you under the terms and conditions of the\nEclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available \nat https://www.eclipse.org/legal/epl-v10.html.\nFor purposes of the EPL, "Program" will mean the Content.

\n\n

If you did not receive this Content directly from the Eclipse Foundation, the Content is \nbeing redistributed by another party ("Redistributor") and different terms and conditions may\napply to your use of any object code in the Content. Check the Redistributor's license that was \nprovided with the Content. If no such license exists, contact the Redistributor. Unless otherwise\nindicated below, the terms and conditions of the EPL still apply to any source code in the Content\nand such source code may be obtained at http://www.eclipse.orgLICENSE.md and is also available at https://www.eclipse.org/legal/epl-2.0/\n\n

MIT License." + } + ] }, { "identifier": "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de", "license_expression": "apache-2.0", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/copyr.java", + "start_line": 18, + "end_line": 31, + "matched_length": 119, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE", + "matched_text": "Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://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,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License." + } + ] }, { "identifier": "gpl_2_0_with_linux_syscall_exception_gpl_or_linux_openib-c196bf1c-1c1f-18b4-554f-690be18bbad0", "license_expression": "gpl-2.0 WITH linux-syscall-exception-gpl OR linux-openib", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/gpl-2.0_with_linux-syscall-note_or_linux-openib_SPDX.RULE", + "start_line": 1, + "end_line": 1, + "matched_length": 13, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "gpl-2.0 WITH linux-syscall-exception-gpl OR linux-openib", + "rule_identifier": "spdx-license-identifier-gpl-2.0 WITH linux-syscall-exception-gpl OR linux-openib-40ad9110ec6551e97f55cd72b297773235a415e7", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-Openib) */" + } + ] }, { "identifier": "ja_sig-025b96bc-0a83-9578-3e3f-0e0375a87457", "license_expression": "ja-sig", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/copyr.java", + "start_line": 4, + "end_line": 13, + "matched_length": 212, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "ja-sig", + "rule_identifier": "ja-sig.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/ja-sig.LICENSE", + "matched_text": "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Redistributions of any form whatsoever must retain the following acknowledgment:\n\"This product includes software developed by the JA-SIG Collaborative (http://www.ja-sig.org/).\"\n\nThis software is provided by the JA-SIG collaborative \"as is\" and any expressed or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the JA-SIG collaborative or its contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability,\n whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage." + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/cocoapods/assemble/many-podspecs-with-license-expected.json b/tests/packagedcode/data/cocoapods/assemble/many-podspecs-with-license-expected.json index 4a488e249fe..7c1c8aa12b6 100644 --- a/tests/packagedcode/data/cocoapods/assemble/many-podspecs-with-license-expected.json +++ b/tests/packagedcode/data/cocoapods/assemble/many-podspecs-with-license-expected.json @@ -569,17 +569,65 @@ { "identifier": "apache_2_0-428c1364-ecb5-f806-7a2e-77d10737a7ce", "license_expression": "apache-2.0", - "detection_count": 6 + "detection_count": 6, + "sample_matches": [ + { + "score": 100.0, + "from_file": "many-podspecs/Amplify.podspec", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_48.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_48.RULE", + "matched_text": "Apache License, Version 2.0" + } + ] }, { "identifier": "apache_2_0-d310abb3-4d20-b3be-830d-ee37b30a997f", "license_expression": "apache-2.0", - "detection_count": 6 + "detection_count": 6, + "sample_matches": [ + { + "score": 100.0, + "from_file": "many-podspecs/Amplify.podspec", + "start_line": 21, + "end_line": 21, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_68.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_68.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-08479bef-4de5-8be8-0987-1bec0c232b20", "license_expression": "apache-2.0", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "many-podspecs/amplify-ios.LICENSE", + "start_line": 2, + "end_line": 175, + "matched_length": 1405, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_70.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_70.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json index 99ab638eab1..488dd4487a2 100644 --- a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json +++ b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json @@ -93,17 +93,79 @@ { "identifier": "mit-24a5293c-14d7-5403-efac-1a8b7532c0e8", "license_expression": "mit", - "detection_count": 4 + "detection_count": 4, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pypi-with-test-manifests/PKG-INFO", + "start_line": 14, + "end_line": 14, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "pypi_mit_license.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pypi-with-test-manifests/LICENSE", + "start_line": 3, + "end_line": 19, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-56f9dd7c-a466-cdf0-4fe0-6e57d31bc32a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pypi-with-test-manifests/PKG-INFO", + "start_line": 26, + "end_line": 26, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_see_license_at_manifest_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see_license_at_manifest_1.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "pypi-with-test-manifests/LICENSE", + "start_line": 3, + "end_line": 19, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json b/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json index 8ee2d1d1336..dafcb9f0c36 100644 --- a/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json +++ b/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json @@ -141,7 +141,23 @@ "identifier": "bsd_new-261898a0-0118-87c4-7092-14e4ff134882", "license_expression": "bsd-new", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 99.0, + "from_file": "pypi/LICENSE.rst", + "start_line": 1, + "end_line": 1, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_89.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_89.RULE", + "matched_text": null + } + ] }, { "identifier": "bsd_new-68720980-08c9-ffb1-f28e-24c2e067385b", @@ -149,6 +165,36 @@ "detection_count": 1, "detection_log": [ "unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "pypi/setup.cfg", + "start_line": 13, + "end_line": 14, + "matched_length": 8, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_1302.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_1302.RULE", + "matched_text": null + }, + { + "score": 99.0, + "from_file": "pypi/LICENSE.rst", + "start_line": 1, + "end_line": 1, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_89.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_89.RULE", + "matched_text": null + } ] }, { @@ -157,13 +203,59 @@ "detection_count": 1, "detection_log": [ "package-unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "pypi/setup.cfg", + "start_line": 1, + "end_line": 1, + "matched_length": 7, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_1305.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_1305.RULE", + "matched_text": "BSD-3-Clause license_files: LICENSE.rst" + }, + { + "score": 99.0, + "from_file": "pypi/LICENSE.rst", + "start_line": 1, + "end_line": 1, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_89.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_89.RULE", + "matched_text": null + } ] }, { "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5", "license_expression": "bsd-new", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 99.0, + "from_file": "pypi/setup.cfg", + "start_line": 25, + "end_line": 25, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "pypi_bsd_license.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/license_detection/license-as-manifest-comment/activemq-camel.expected.json b/tests/packagedcode/data/license_detection/license-as-manifest-comment/activemq-camel.expected.json index a36d714cd78..c8161b92298 100644 --- a/tests/packagedcode/data/license_detection/license-as-manifest-comment/activemq-camel.expected.json +++ b/tests/packagedcode/data/license_detection/license-as-manifest-comment/activemq-camel.expected.json @@ -236,6 +236,22 @@ "detection_count": 2, "detection_log": [ "from-package-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "activemq-camel/activemq-camel-pom.xml", + "start_line": 3, + "end_line": 16, + "matched_length": 119, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE", + "matched_text": "Licensed to the Apache Software Foundation (ASF) under one or more\n contributor license agreements. See the NOTICE file distributed with\n this work for additional information regarding copyright ownership.\n The ASF licenses this file to You under the Apache License, Version 2.0\n (the \"License\"); you may not use this file except in compliance with\n the License. You may obtain a copy of the License at\n \n http://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,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + } ] } ], diff --git a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection.expected.json b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection.expected.json index 7c6e42c1a73..6fc148cfba4 100644 --- a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection.expected.json +++ b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection.expected.json @@ -118,7 +118,23 @@ "identifier": "bsd_new-050b3051-820b-200e-26c9-1a3c8e9761d2", "license_expression": "bsd-new", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "google-built-collection/LICENSE", + "start_line": 3, + "end_line": 28, + "matched_length": 212, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_166.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_166.RULE", + "matched_text": "Redistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n\n * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/license_detection/multi-flavor/jquery-form-3.51.0.expected.json b/tests/packagedcode/data/license_detection/multi-flavor/jquery-form-3.51.0.expected.json index 9b3593a0606..0acb30fc8c8 100644 --- a/tests/packagedcode/data/license_detection/multi-flavor/jquery-form-3.51.0.expected.json +++ b/tests/packagedcode/data/license_detection/multi-flavor/jquery-form-3.51.0.expected.json @@ -455,49 +455,191 @@ "identifier": "mit_or_gpl_2_0_plus__and_gpl_2_0-876682c2-38c1-1236-75ea-c46243d9c414", "license_expression": "(mit OR gpl-2.0-plus) AND gpl-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "jquery-form-3.51.0/composer.json", + "start_line": 21, + "end_line": 23, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit OR gpl-2.0-plus", + "rule_identifier": "mit_or_gpl-2.0-plus_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_gpl-2.0-plus_1.RULE", + "matched_text": "license\": [\n \"MIT\",\n \"GPL-" + }, + { + "score": 100.0, + "from_file": "jquery-form-3.51.0/composer.json", + "start_line": 23, + "end_line": 23, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_52.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_52.RULE", + "matched_text": "GPL-2.0\"" + } + ] }, { "identifier": "gpl_1_0_plus-473308ff-72ce-7e72-b3a9-5b1cc6680abb", "license_expression": "gpl-1.0-plus", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 50.0, + "from_file": "jquery-form-3.51.0/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_bare_word_only.RULE", + "rule_relevance": 50, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_bare_word_only.RULE", + "matched_text": "GPL" + } + ] }, { "identifier": "gpl_1_0_plus-b6a20479-06f3-d753-878b-d3193c879108", "license_expression": "gpl-1.0-plus", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "jquery-form-3.51.0/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_200.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_200.RULE", + "matched_text": "http://malsup.github.com/gpl-license-v2.txt" + } + ] }, { "identifier": "gpl_2_0-d7f02717-086e-f71b-962e-b18cc23b1827", "license_expression": "gpl-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "jquery-form-3.51.0/composer.json", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_52.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_52.RULE", + "matched_text": "GPL-2.0" + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "jquery-form-3.51.0/composer.json", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] }, { "identifier": "mit-9967e727-165e-9bb5-f090-7de5e47a3929", "license_expression": "mit", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "jquery-form-3.51.0/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_14.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "http://malsup.github.com/mit-license.txt" + } + ] }, { "identifier": "mit_or_gpl_2_0-562fb174-abc9-da75-d29f-5bc4f1d9c56f", "license_expression": "mit OR gpl-2.0", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 94.81, + "from_file": "jquery-form-3.51.0/README.md", + "start_line": 12, + "end_line": 21, + "matched_length": 128, + "match_coverage": 94.81, + "matcher": "3-seq", + "license_expression": "mit OR gpl-2.0", + "rule_identifier": "mit_or_gpl-2.0_68.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_gpl-2.0_68.RULE", + "matched_text": "are dual licensed under the MIT and GPL licenses:\n\n* [MIT](http://malsup.github.com/mit-license.txt)\n* [GPL](http://malsup.github.com/gpl-license-v2.txt)\n\nYou may use either license. The MIT License is recommended for most projects because it is simple and easy to understand and it places almost no restrictions on what you can do with the plugin.\n\nIf the GPL suits your project better you are also free to use the plugin under that license.\n\nYou don't have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using. You are free to use the jQuery Form Plugin in commercial projects as long as the copyright header is left intact." + } + ] }, { "identifier": "mit_or_gpl_2_0-7f34a90b-f7b4-e345-2cc0-2de55fdcc1bd", "license_expression": "mit OR gpl-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "jquery-form-3.51.0/package.json", + "start_line": 17, + "end_line": 22, + "matched_length": 21, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit OR gpl-2.0", + "rule_identifier": "mit_or_gpl-2.0_69.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_gpl-2.0_69.RULE", + "matched_text": "type\": \"MIT\",\n \"url\": \"http://malsup.github.com/mit-license.txt\"\n },\n {\n \"type\": \"GPL\",\n \"url\": \"http://malsup.github.com/gpl-license-v2.txt\"" + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/license_detection/reference-at-manifest/fizzler.expected.json b/tests/packagedcode/data/license_detection/reference-at-manifest/fizzler.expected.json index 9de3371e388..d005e7ada6e 100644 --- a/tests/packagedcode/data/license_detection/reference-at-manifest/fizzler.expected.json +++ b/tests/packagedcode/data/license_detection/reference-at-manifest/fizzler.expected.json @@ -150,13 +150,87 @@ "detection_count": 1, "detection_log": [ "unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 33.0, + "from_file": "fizzler/Fizzler.nuspec", + "start_line": 9, + "end_line": 9, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_382.RULE", + "rule_relevance": 33, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_382.RULE", + "matched_text": "license type=\"file\">COPYING.txt" + }, + { + "score": 100.0, + "from_file": "fizzler/COPYING.txt", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.0-plus", + "rule_identifier": "lgpl-2.0-plus_87.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.0-plus_87.RULE", + "matched_text": "GNU LESSER GENERAL PUBLIC LICENSE" + }, + { + "score": 100.0, + "from_file": "fizzler/COPYING.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_63.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_63.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE" + } ] }, { "identifier": "lgpl_2_0_plus_and_gpl_1_0_plus-2a11c930-7038-736e-5e48-b35f872691cc", "license_expression": "lgpl-2.0-plus AND gpl-1.0-plus", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fizzler/COPYING.txt", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.0-plus", + "rule_identifier": "lgpl-2.0-plus_87.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.0-plus_87.RULE", + "matched_text": "GNU LESSER GENERAL PUBLIC LICENSE" + }, + { + "score": 100.0, + "from_file": "fizzler/COPYING.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_63.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_63.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE" + } + ] }, { "identifier": "lgpl_2_0_plus_and_gpl_1_0_plus-de66a0ae-df4d-ab6b-975e-8deb27c0f945", @@ -164,6 +238,50 @@ "detection_count": 1, "detection_log": [ "package-unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 16.0, + "from_file": "fizzler/Fizzler.nuspec", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_383.RULE", + "rule_relevance": 16, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_383.RULE", + "matched_text": "license COPYING.txt" + }, + { + "score": 100.0, + "from_file": "fizzler/COPYING.txt", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.0-plus", + "rule_identifier": "lgpl-2.0-plus_87.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.0-plus_87.RULE", + "matched_text": "GNU LESSER GENERAL PUBLIC LICENSE" + }, + { + "score": 100.0, + "from_file": "fizzler/COPYING.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_63.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_63.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE" + } ] } ], diff --git a/tests/packagedcode/data/license_detection/reference-at-manifest/flutter_playtabs_bridge.expected.json b/tests/packagedcode/data/license_detection/reference-at-manifest/flutter_playtabs_bridge.expected.json index 38097deccf8..a83d73453fb 100644 --- a/tests/packagedcode/data/license_detection/reference-at-manifest/flutter_playtabs_bridge.expected.json +++ b/tests/packagedcode/data/license_detection/reference-at-manifest/flutter_playtabs_bridge.expected.json @@ -115,13 +115,87 @@ "detection_count": 2, "detection_log": [ "unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "flutter_playtabs_bridge/flutter_paytabs_bridge.podspec", + "start_line": 13, + "end_line": 13, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_see_license_at_manifest_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see_license_at_manifest_1.RULE", + "matched_text": "license = { :file => '../LICENSE' }" + }, + { + "score": 100.0, + "from_file": "flutter_playtabs_bridge/LICENSE", + "start_line": 1, + "end_line": 1, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_14.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License" + }, + { + "score": 100.0, + "from_file": "flutter_playtabs_bridge/LICENSE", + "start_line": 5, + "end_line": 21, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": "Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE." + } ] }, { "identifier": "mit-ac40beba-5702-f54d-755f-333441314bb0", "license_expression": "mit", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "flutter_playtabs_bridge/LICENSE", + "start_line": 1, + "end_line": 1, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_14.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License" + }, + { + "score": 100.0, + "from_file": "flutter_playtabs_bridge/LICENSE", + "start_line": 5, + "end_line": 21, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": "Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE." + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/license_detection/reference-at-manifest/nanopb.expected.json b/tests/packagedcode/data/license_detection/reference-at-manifest/nanopb.expected.json index 8f453614eef..f434eb9daab 100644 --- a/tests/packagedcode/data/license_detection/reference-at-manifest/nanopb.expected.json +++ b/tests/packagedcode/data/license_detection/reference-at-manifest/nanopb.expected.json @@ -101,13 +101,59 @@ "detection_count": 2, "detection_log": [ "unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "nanopb/nanopb.podspec", + "start_line": 14, + "end_line": 14, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_in_manifest.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_in_manifest.RULE", + "matched_text": "type => 'zlib', :file => 'LICENSE.txt' }" + }, + { + "score": 100.0, + "from_file": "nanopb/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 132, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/zlib.LICENSE", + "matched_text": "This software is provided 'as-is', without any express or \nimplied warranty. In no event will the authors be held liable \nfor any damages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any \npurpose, including commercial applications, and to alter it and \nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you \n must not claim that you wrote the original software. If you use \n this software in a product, an acknowledgment in the product \n documentation would be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and \n must not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source \n distribution." + } ] }, { "identifier": "zlib-f32ae987-c66a-44ce-bd13-c90e0c59aab8", "license_expression": "zlib", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "nanopb/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 132, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/zlib.LICENSE", + "matched_text": "This software is provided 'as-is', without any express or \nimplied warranty. In no event will the authors be held liable \nfor any damages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any \npurpose, including commercial applications, and to alter it and \nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you \n must not claim that you wrote the original software. If you use \n this software in a product, an acknowledgment in the product \n documentation would be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and \n must not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source \n distribution." + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/license_detection/reference-to-package/base.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/base.expected.json index 62719cbd618..cb9fd3ca93e 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/base.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/base.expected.json @@ -96,7 +96,23 @@ "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5", "license_expression": "bsd-new", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 99.0, + "from_file": "base-example/PKG-INFO", + "start_line": 16, + "end_line": 16, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "pypi_bsd_license.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE", + "matched_text": "License :: OSI Approved :: BSD License" + } + ] }, { "identifier": "bsd_new-af493d9f-0c66-d9f8-4538-579134812514", @@ -104,6 +120,36 @@ "detection_count": 1, "detection_log": [ "unknown-reference-in-file-to-package" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "base-example/django.po", + "start_line": 1, + "end_line": 1, + "matched_length": 11, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_1.RULE", + "matched_text": "This file is distributed under the same license as the package." + }, + { + "score": 99.0, + "from_file": "PKG-INFO", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "bsd-new", + "rule_identifier": "pypi_bsd_license.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE", + "matched_text": "- 'License :: OSI Approved :: BSD License'" + } ] } ], diff --git a/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json index 91b9f0a562c..1edcc00e92c 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json @@ -4759,43 +4759,155 @@ "identifier": "bsd_new-008266ae-6939-ad31-3617-228b0809863c", "license_expression": "bsd-new", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 441, + "end_line": 441, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_195.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_195.RULE", + "matched_text": "License: BSD-3-clause" + } + ] }, { "identifier": "bsd_original-9198bafe-47c0-f9dc-5ef1-bd276a69786e", "license_expression": "bsd-original", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1501, + "end_line": 1501, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-original", + "rule_identifier": "bsd-original_43.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-original_43.RULE", + "matched_text": "License: BSD-4-clause" + } + ] }, { "identifier": "bsd_simplified-2383ae10-5494-e069-46c2-e2d6cb56951f", "license_expression": "bsd-simplified", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 2880, + "end_line": 2880, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-simplified", + "rule_identifier": "bsd-simplified_136.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-simplified_136.RULE", + "matched_text": "License: BSD (2 clause)" + } + ] }, { "identifier": "free_unknown-34d6195a-6206-be2e-4bd2-ce3b9493a1ad", "license_expression": "free-unknown", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/po/fr.po", + "start_line": 3, + "end_line": 3, + "matched_length": 11, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_1.RULE", + "matched_text": "This file is distributed under the same license as the package." + } + ] }, { "identifier": "free_unknown-fddf748a-9953-bc6c-cb9d-91001840e335", "license_expression": "free-unknown", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/po/de.po", + "start_line": 3, + "end_line": 3, + "matched_length": 10, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_4.RULE", + "matched_text": "This file is distributed under the same license as the" + } + ] }, { "identifier": "gpl_2_0_plus-227f50b1-f05e-5b3b-b107-ae1e2f56448b", "license_expression": "gpl-2.0-plus", "detection_count": 44, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 2692, + "end_line": 2692, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_687.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_687.RULE", + "matched_text": "License: GPL (v2 or later)" + } + ] }, { "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9", "license_expression": "gpl-2.0-plus", "detection_count": 42, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 297, + "end_line": 297, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_22.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_22.RULE", + "matched_text": "License: GPL-2+" + } + ] }, { "identifier": "gpl_2_0_plus-fed2dc38-09ac-103e-1b86-4a4f5c00614a", @@ -4804,31 +4916,433 @@ "detection_log": [ "possible-false-positive", "not-license-clues-as-more-detections-present" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1099, + "end_line": 1099, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_67.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_67.RULE", + "matched_text": "GPL-2+)." + } ] }, { "identifier": "gpl_2_0_plus_and_free_unknown-7df72521-0609-4896-2583-44c45dd3f8e6", "license_expression": "gpl-2.0-plus AND free-unknown", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 411, + "end_line": 411, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_22.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_22.RULE", + "matched_text": "License: GPL-2+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 413, + "end_line": 413, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + } + ] }, { "identifier": "gpl_2_0_plus_and_free_unknown-f9cd0597-d35d-ec72-0e6b-77970ad90317", "license_expression": "gpl-2.0-plus AND free-unknown", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 560, + "end_line": 560, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_22.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_22.RULE", + "matched_text": "License: GPL-2+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 562, + "end_line": 562, + "matched_length": 10, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_4.RULE", + "matched_text": "This file is distributed under the same license as the" + } + ] }, { "identifier": "gpl_2_0_plus_and_gpl_3_0_plus_and_lgpl_2_1_plus_and_lgpl_3_0_plus_and_bsd_new_and_bsd_original_and_mit_and_public_domain_and_other_permissive-9e2a213a-3fc4-9ee3-8e3f-783829530b14", "license_expression": "gpl-2.0-plus AND gpl-3.0-plus AND lgpl-2.1-plus AND lgpl-3.0-plus AND bsd-new AND bsd-original AND mit AND public-domain AND other-permissive", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1521, + "end_line": 1521, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_22.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_22.RULE", + "matched_text": "License: GPL-2+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1521, + "end_line": 1521, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0-plus", + "rule_identifier": "gpl-3.0-plus_89.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0-plus_89.RULE", + "matched_text": "GPL-3+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1521, + "end_line": 1521, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.1-plus", + "rule_identifier": "lgpl-2.1-plus_64.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.1-plus_64.RULE", + "matched_text": "LGPL-2.1+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1521, + "end_line": 1521, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0-plus", + "rule_identifier": "lgpl-3.0-plus_36.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0-plus_36.RULE", + "matched_text": "LGPL-3+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1521, + "end_line": 1521, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_10.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_10.RULE", + "matched_text": "BSD-3-clause" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1521, + "end_line": 1521, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-original", + "rule_identifier": "spdx_license_id_bsd-4-clause_for_bsd-original.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_bsd-4-clause_for_bsd-original.RULE", + "matched_text": "BSD-4-clause" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1523, + "end_line": 1523, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_22.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_22.RULE", + "matched_text": "License: GPL-2+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1524, + "end_line": 1539, + "matched_length": 136, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_1038.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_1038.RULE", + "matched_text": "This package is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n .\n This package is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n .\n You should have received a copy of the GNU General Public License\n along with this package; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n .\n On Debian systems, the complete text of the GNU General\n Public License 2 can be found in `/usr/share/common-licenses/GPL-2'." + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1541, + "end_line": 1541, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0-plus", + "rule_identifier": "gpl-3.0-plus_92.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0-plus_92.RULE", + "matched_text": "License: GPL-3+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1542, + "end_line": 1557, + "matched_length": 136, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0-plus", + "rule_identifier": "gpl-3.0-plus_512.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0-plus_512.RULE", + "matched_text": "This package is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 3 of the License, or\n (at your option) any later version.\n .\n This package is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n .\n You should have received a copy of the GNU General Public License\n along with this package; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n .\n On Debian systems, the complete text of the GNU General\n Public License 3 can be found in `/usr/share/common-licenses/GPL-3'." + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1559, + "end_line": 1559, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.1-plus", + "rule_identifier": "lgpl-2.1-plus_108.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.1-plus_108.RULE", + "matched_text": "License: LGPL-2.1+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1560, + "end_line": 1577, + "matched_length": 146, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.1-plus", + "rule_identifier": "lgpl-2.1-plus_418.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.1-plus_418.RULE", + "matched_text": "This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n .\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n .\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n MA 02110-1301 USA\n .\n On Debian systems, the full text of the GNU Lesser General Public\n License version 2,1 can be found in the file\n `/usr/share/common-licenses/LGPL-2.1'." + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1579, + "end_line": 1579, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_437.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_437.RULE", + "matched_text": "License: Expat" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1580, + "end_line": 1596, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": "Permission is hereby granted, free of charge, to any person obtaining a copy of\n this software and associated documentation files (the \"Software\"), to deal in\n the Software without restriction, including without limitation the rights to\n use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n of the Software, and to permit persons to whom the Software is furnished to do\n so, subject to the following conditions:\n .\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n .\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE." + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1598, + "end_line": 1598, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_195.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_195.RULE", + "matched_text": "License: BSD-3-clause" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1599, + "end_line": 1621, + "matched_length": 213, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_577.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_577.RULE", + "matched_text": "Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n .\n - Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n - Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n - Neither the name of the copyright holder nor the names of its contributors\n may be used to endorse or promote products derived from this software\n without specific prior written permission.\n .\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1623, + "end_line": 1623, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-original", + "rule_identifier": "bsd-original_43.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-original_43.RULE", + "matched_text": "License: BSD-4-clause" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1624, + "end_line": 1649, + "matched_length": 236, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-original", + "rule_identifier": "bsd-original_71.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-original_71.RULE", + "matched_text": "Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n .\n - Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n - Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n - All advertising materials mentioning features or use of this software must\n display the following acknowledgement: \u201cThis product includes software\n developed by the .\u201d\n - Neither the name of the author(s) nor the names of this program's\n contributors may be used to endorse or promote products derived from this\n software without specific prior written permission.\n .\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) \u201cAS IS\u201d AND ANY EXPRESS OR IMPLIED\n WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1651, + "end_line": 1651, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0-plus", + "rule_identifier": "lgpl-3.0-plus_166.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0-plus_166.RULE", + "matched_text": "License: LGPL-3+" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1652, + "end_line": 1663, + "matched_length": 105, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0-plus", + "rule_identifier": "lgpl-3.0-plus_189.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0-plus_189.RULE", + "matched_text": "This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 3 of the License, or (at your option) any later version.\n .\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n .\n On Debian systems, the complete text of the GNU Lesser General\n Public License 3 can be found in `/usr/share/common-licenses/LGPL-3'." + }, + { + "score": 99.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1665, + "end_line": 1665, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "public-domain", + "rule_identifier": "pypi_public_domain.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_public_domain.RULE", + "matched_text": "License: public-domain" + }, + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1666, + "end_line": 1669, + "matched_length": 40, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "other-permissive", + "rule_identifier": "other-permissive_325.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/other-permissive_325.RULE", + "matched_text": "This file is in the public domain. You may use and modify it as\n you see fit, as long as this copyright message is included and\n that there is an indication as to what modifications have been\n made (if any)." + } + ] }, { "identifier": "lgpl_3_0_plus-4c8d95b2-1acf-7a81-473c-d8e70962288c", "license_expression": "lgpl-3.0-plus", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 968, + "end_line": 968, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0-plus", + "rule_identifier": "lgpl-3.0-plus_166.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0-plus_166.RULE", + "matched_text": "License: LGPL-3+" + } + ] }, { "identifier": "mit-1f9f2ae8-7020-0a13-7934-461c752929a4", @@ -4837,6 +5351,22 @@ "detection_log": [ "possible-false-positive", "not-license-clues-as-more-detections-present" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1429, + "end_line": 1429, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_437.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_437.RULE", + "matched_text": "License: Expat" + } ] }, { @@ -4846,6 +5376,22 @@ "detection_log": [ "possible-false-positive", "not-license-clues-as-more-detections-present" + ], + "sample_matches": [ + { + "score": 99.0, + "from_file": "fusiondirectory/debian/copyright", + "start_line": 1094, + "end_line": 1094, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "public-domain", + "rule_identifier": "pypi_public_domain.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_public_domain.RULE", + "matched_text": "License: public-domain" + } ] } ], diff --git a/tests/packagedcode/data/license_detection/reference-to-package/google_appengine_sdk.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/google_appengine_sdk.expected.json index 2213a0d8322..1f4bee613f4 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/google_appengine_sdk.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/google_appengine_sdk.expected.json @@ -189,13 +189,45 @@ "identifier": "apache_2_0_and_cc_by_nc_nd_3_0_and_other_permissive_and_proprietary_license-21b00e16-ec3a-6dc3-3971-5dbd5f5b756a", "license_expression": "apache-2.0 AND cc-by-nc-nd-3.0 AND other-permissive AND proprietary-license", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 5.88, + "from_file": "google_appengine_sdk/django-1.2/MANIFEST.in", + "start_line": 7, + "end_line": 9, + "matched_length": 5, + "match_coverage": 5.88, + "matcher": "3-seq", + "license_expression": "apache-2.0 AND cc-by-nc-nd-3.0 AND other-permissive AND proprietary-license", + "rule_identifier": "apache-2.0_and_cc-by-nc-nd-3.0_and_other-permissive_and_proprietary-license_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_and_cc-by-nc-nd-3.0_and_other-permissive_and_proprietary-license_1.RULE", + "matched_text": "LICENSE\n[include] [django]/[dispatch]/license.txt\n[include] [django]/[utils]/[simplejson]/LICENSE.txt" + } + ] }, { "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5", "license_expression": "bsd-new", "detection_count": 6, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 99.0, + "from_file": "google_appengine_sdk/django-1.2/setup.py", + "start_line": 89, + "end_line": 89, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "pypi_bsd_license.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE", + "matched_text": "License :: OSI Approved :: BSD License'," + } + ] }, { "identifier": "bsd_new-cdb8fe96-c13c-043d-8031-aebb4cd77653", @@ -203,13 +235,59 @@ "detection_count": 5, "detection_log": [ "unknown-reference-in-file-to-package" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "google_appengine_sdk/django-1.2/django/conf/locale/en/formats.py", + "start_line": 2, + "end_line": 2, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_3.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_3.RULE", + "matched_text": "This file is distributed under the same license as the Django package." + }, + { + "score": 99.0, + "from_file": "django-1.2/setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "bsd-new", + "rule_identifier": "pypi_bsd_license.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE", + "matched_text": "- 'License :: OSI Approved :: BSD License'" + } ] }, { "identifier": "bsd_new-72cae3bc-4423-3a9e-be84-ee8bb5120a4d", "license_expression": "bsd-new", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "google_appengine_sdk/django-1.3/LICENSE", + "start_line": 4, + "end_line": 27, + "matched_length": 214, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-new", + "rule_identifier": "bsd-new_683.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_683.RULE", + "matched_text": "Redistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice, \n this list of conditions and the following disclaimer.\n \n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n 3. Neither the name of Django nor the names of its contributors may be used\n to endorse or promote products derived from this software without\n specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + } + ] }, { "identifier": "bsd_new-734cc7c8-5d13-b9e1-3f7c-d04a0d9396c7", @@ -217,6 +295,36 @@ "detection_count": 2, "detection_log": [ "unknown-reference-in-file-to-package" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "google_appengine_sdk/django-1.2/django/conf/locale/uk/LC_MESSAGES/django.po", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 99.0, + "from_file": "django-1.2/setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "bsd-new", + "rule_identifier": "pypi_bsd_license.RULE", + "rule_relevance": 99, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE", + "matched_text": "- 'License :: OSI Approved :: BSD License'" + } ] } ], diff --git a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json index 95a9709ee86..5c141a6ffb6 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json @@ -391,13 +391,73 @@ "detection_count": 2, "detection_log": [ "unknown-reference-in-file-to-package" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "paddlenlp/docs/locale/en/LC_MESSAGES/changelog.po", + "start_line": 3, + "end_line": 3, + "matched_length": 10, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_4.RULE", + "matched_text": "This file is distributed under the same license as the" + }, + { + "score": 100.0, + "from_file": "setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": "Apache 2.0" + }, + { + "score": 95.0, + "from_file": "setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "pypi_apache_no-version.RULE", + "rule_relevance": 95, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_apache_no-version.RULE", + "matched_text": "- 'License :: OSI Approved :: Apache Software License'" + } ] }, { "identifier": "apache_2_0-999670be-3d5e-ebf8-ae18-b555c26c5e80", "license_expression": "apache-2.0", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 66.67, + "from_file": "paddlenlp/README.md", + "start_line": 305, + "end_line": 307, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_1215.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1215.RULE", + "matched_text": "License\n\n[PaddleNLP\u9075\u5faa][Apache-2.[0\u5f00\u6e90\u534f\u8bae]](./LICENSE)\u3002" + } + ] }, { "identifier": "apache_2_0-abb5bcc3-dac9-a935-3392-31a86beb482a", @@ -405,43 +465,183 @@ "detection_count": 2, "detection_log": [ "unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "paddlenlp/README_en.md", + "start_line": 221, + "end_line": 221, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_83.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_83.RULE", + "matched_text": "is provided under the [Apache-2.0 License](./LICENSE)." + }, + { + "score": 99.81, + "from_file": "paddlenlp/LICENSE", + "start_line": 3, + "end_line": 203, + "matched_length": 1582, + "match_coverage": 100.0, + "matcher": "3-seq", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_164.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", + "matched_text": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://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,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + } ] }, { "identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e", "license_expression": "apache-2.0", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 99.81, + "from_file": "paddlenlp/LICENSE", + "start_line": 3, + "end_line": 203, + "matched_length": 1582, + "match_coverage": 100.0, + "matcher": "3-seq", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_164.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", + "matched_text": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://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,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + } + ] }, { "identifier": "apache_2_0-3972bfb2-eb21-3d0c-d862-1642babb9f95", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 74.36, + "from_file": "paddlenlp/setup.py", + "start_line": 1, + "end_line": 13, + "matched_length": 87, + "match_coverage": 74.36, + "matcher": "3-seq", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_1297.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1297.RULE", + "matched_text": "All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this [file] except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://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,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License." + } + ] }, { "identifier": "apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "paddlenlp/hubconf.py", + "start_line": 3, + "end_line": 13, + "matched_length": 85, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_7.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_7.RULE", + "matched_text": "Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://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,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License." + } + ] }, { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "paddlenlp/setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": "Apache 2.0" + } + ] }, { "identifier": "apache_2_0-da72644e-69e0-e2c0-89c5-5d42277b3f3b", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 95.0, + "from_file": "paddlenlp/setup.py", + "start_line": 75, + "end_line": 75, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "pypi_apache_no-version.RULE", + "rule_relevance": 95, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_apache_no-version.RULE", + "matched_text": "License :: OSI Approved :: Apache Software License'," + }, + { + "score": 100.0, + "from_file": "paddlenlp/setup.py", + "start_line": 78, + "end_line": 78, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": "license='Apache 2.0')" + } + ] }, { "identifier": "apache_2_0-e267f9d9-ae62-e9c9-9cc2-8cd0a1e4928f", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 95.0, + "from_file": "paddlenlp/setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "pypi_apache_no-version.RULE", + "rule_relevance": 95, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_apache_no-version.RULE", + "matched_text": "- 'License :: OSI Approved :: Apache Software License'" + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/license_detection/reference-to-package/physics.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/physics.expected.json index eca6861505f..ca5c7cc82bb 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/physics.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/physics.expected.json @@ -6,7 +6,23 @@ "identifier": "gpl_3_0-ab79e5a8-e510-cbf4-5302-ef968484bcdf", "license_expression": "gpl-3.0", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "physics/COPYING", + "start_line": 2, + "end_line": 675, + "matched_length": 5514, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_204.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_204.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE\n\t\t Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\t\t\t Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n\t\t TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n \n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n \n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n\t\t END OF TERMS AND CONDITIONS\n\n\t How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n." + } + ] }, { "identifier": "gpl_3_0-76e8f741-ece2-d587-493c-92b0b1e4bdfe", @@ -14,6 +30,106 @@ "detection_count": 1, "detection_log": [ "unknown-reference-in-file-to-nonexistent-package" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "physics/po/uk.po", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/uk.po", + "start_line": 7, + "end_line": 7, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/uk.po", + "start_line": 11, + "end_line": 11, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/uk.po", + "start_line": 15, + "end_line": 15, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/uk.po", + "start_line": 19, + "end_line": 19, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/uk.po", + "start_line": 23, + "end_line": 23, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/COPYING", + "start_line": 2, + "end_line": 675, + "matched_length": 5514, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_204.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_204.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE\n\t\t Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\t\t\t Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n\t\t TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n \n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n \n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n\t\t END OF TERMS AND CONDITIONS\n\n\t How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n." + } ] }, { @@ -22,19 +138,193 @@ "detection_count": 1, "detection_log": [ "unknown-reference-in-file-to-nonexistent-package" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "physics/po/en_US.po", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/en_US.po", + "start_line": 7, + "end_line": 7, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/en_US.po", + "start_line": 11, + "end_line": 11, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/en_US.po", + "start_line": 15, + "end_line": 15, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/en_US.po", + "start_line": 19, + "end_line": 19, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/en_US.po", + "start_line": 23, + "end_line": 23, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/po/en_US.po", + "start_line": 27, + "end_line": 27, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_2.RULE", + "matched_text": "This file is distributed under the same license as the PACKAGE package." + }, + { + "score": 100.0, + "from_file": "physics/COPYING", + "start_line": 2, + "end_line": 675, + "matched_length": 5514, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_204.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_204.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE\n\t\t Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\t\t\t Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n\t\t TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n \n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n \n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n\t\t END OF TERMS AND CONDITIONS\n\n\t How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n." + } ] }, { "identifier": "gpl_3_0_and_unknown_license_reference_and_gpl_3_0_plus-ebd5f076-5cba-e641-e071-0028c4ee0ddb", "license_expression": "gpl-3.0 AND unknown-license-reference AND gpl-3.0-plus", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "physics/myelements/callbacks.py", + "start_line": 13, + "end_line": 13, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_203.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_203.RULE", + "matched_text": "License: GPLv3 |" + }, + { + "score": 100.0, + "from_file": "physics/myelements/callbacks.py", + "start_line": 13, + "end_line": 13, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_367.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_367.RULE", + "matched_text": "See LICENSE for the full text" + }, + { + "score": 100.0, + "from_file": "physics/myelements/callbacks.py", + "start_line": 14, + "end_line": 25, + "matched_length": 102, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0-plus", + "rule_identifier": "gpl-3.0-plus_290.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0-plus_290.RULE", + "matched_text": "This program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see ." + } + ] }, { "identifier": "gpl_3_0_plus-494d0068-7138-a14f-4cbb-fd2137263a4f", "license_expression": "gpl-3.0-plus", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "physics/physics.py", + "start_line": 10, + "end_line": 21, + "matched_length": 102, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0-plus", + "rule_identifier": "gpl-3.0-plus_290.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0-plus_290.RULE", + "matched_text": "This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n\n# You should have received a copy of the GNU General Public License\n# along with this program. If not, see ." + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json index f1b2cb73739..615a2a4b0cd 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json @@ -264,31 +264,195 @@ "identifier": "cc_by_sa_3_0_and_cc_by_sa_4_0_and_dco_1_1-4fb8e409-441a-1243-5a0d-d6af2acc0c62", "license_expression": "cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1", "detection_count": 3, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 75.0, + "from_file": "samba/README.contributing", + "start_line": 121, + "end_line": 122, + "matched_length": 12, + "match_coverage": 75.0, + "matcher": "3-seq", + "license_expression": "cc-by-sa-3.0", + "rule_identifier": "cc-by-sa-3.0_10.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-3.0_10.RULE", + "matched_text": "licensed under Creative Commons Attribution-ShareAlike [4].[0] License [as] [found]\n[at] [https]://creativecommons.org/licenses/by-sa/" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 122, + "end_line": 122, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cc-by-sa-4.0", + "rule_identifier": "cc-by-sa-4.0_71.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-4.0_71.RULE", + "matched_text": "https://creativecommons.org/licenses/by-sa/4.0/legalcode" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 123, + "end_line": 123, + "matched_length": 7, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "dco-1.1", + "rule_identifier": "dco-1.1_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/dco-1.1_2.RULE", + "matched_text": "Developer's Certificate of Origin 1.1\"" + } + ] }, { "identifier": "gpl_1_0_plus-4347f44c-ada6-f802-86dd-14a96429fac1", "license_expression": "gpl-1.0-plus", "detection_count": 3, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 63, + "end_line": 63, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_33.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_33.RULE", + "matched_text": "the GNU General Public License," + } + ] }, { "identifier": "gpl_1_0_plus_and_lgpl_3_0_plus_and_gpl_3_0_and_lgpl_3_0-3bd18dcd-0a4c-d46f-f42e-3d2919be9be0", "license_expression": "gpl-1.0-plus AND lgpl-3.0-plus AND gpl-3.0 AND lgpl-3.0", "detection_count": 3, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 76, + "end_line": 76, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_bare_gnu_gpl.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_bare_gnu_gpl.RULE", + "matched_text": "GNU GPL" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 79, + "end_line": 79, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_33.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_33.RULE", + "matched_text": "the GNU General Public License" + }, + { + "score": 47.22, + "from_file": "samba/README.contributing", + "start_line": 79, + "end_line": 81, + "matched_length": 17, + "match_coverage": 47.22, + "matcher": "3-seq", + "license_expression": "lgpl-3.0-plus", + "rule_identifier": "lgpl-3.0-plus_103.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0-plus_103.RULE", + "matched_text": "the GNU Lesser General Public\n License as published by the Free Software Foundation; either version\n 3 of" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 84, + "end_line": 84, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_12.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_12.RULE", + "matched_text": "http://www.gnu.org/licenses/gpl-3.0.html" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 85, + "end_line": 85, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0", + "rule_identifier": "lgpl-3.0_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_1.RULE", + "matched_text": "http://www.gnu.org/licenses/lgpl-3.0.html" + } + ] }, { "identifier": "gpl_2_0-29c387aa-50e0-0530-7b0b-aa32e3c372d6", "license_expression": "gpl-2.0", "detection_count": 3, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 81.82, + "from_file": "samba/README.md", + "start_line": 6, + "end_line": 6, + "matched_length": 9, + "match_coverage": 81.82, + "matcher": "3-seq", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_1142.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_1142.RULE", + "matched_text": "Free Software licensed under the GNU General Public License" + } + ] }, { "identifier": "gpl_3_0-ab79e5a8-e510-cbf4-5302-ef968484bcdf", "license_expression": "gpl-3.0", "detection_count": 3, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "samba/COPYING", + "start_line": 1, + "end_line": 674, + "matched_length": 5514, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_204.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_204.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n." + } + ] }, { "identifier": "gpl_3_0-db305a6e-7013-4ffa-0ad4-09f113582e67", @@ -296,6 +460,36 @@ "detection_count": 3, "detection_log": [ "unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "samba/README.md", + "start_line": 22, + "end_line": 24, + "matched_length": 24, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_579.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_579.RULE", + "matched_text": "This software is freely distributable under the GNU public license, a\ncopy of which you should have received with this software (in a file\ncalled COPYING)." + }, + { + "score": 100.0, + "from_file": "samba/COPYING", + "start_line": 1, + "end_line": 674, + "matched_length": 5514, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_204.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_204.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n." + } ] }, { @@ -304,13 +498,227 @@ "detection_count": 1, "detection_log": [ "unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "samba/source3/locale/net/de.po", + "start_line": 4, + "end_line": 4, + "matched_length": 10, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "free-unknown", + "rule_identifier": "free-unknown-package_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_4.RULE", + "matched_text": "This file is distributed under the same license as the" + }, + { + "score": 100.0, + "from_file": "samba/COPYING", + "start_line": 1, + "end_line": 674, + "matched_length": 5514, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_204.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_204.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n." + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 63, + "end_line": 63, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_33.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_33.RULE", + "matched_text": "the GNU General Public License," + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 76, + "end_line": 76, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_bare_gnu_gpl.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_bare_gnu_gpl.RULE", + "matched_text": "GNU GPL" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 79, + "end_line": 79, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_33.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_33.RULE", + "matched_text": "the GNU General Public License" + }, + { + "score": 47.22, + "from_file": "samba/README.contributing", + "start_line": 79, + "end_line": 81, + "matched_length": 17, + "match_coverage": 47.22, + "matcher": "3-seq", + "license_expression": "lgpl-3.0-plus", + "rule_identifier": "lgpl-3.0-plus_103.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0-plus_103.RULE", + "matched_text": "the GNU Lesser General Public\n License as published by the Free Software Foundation; either version\n 3 of" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 84, + "end_line": 84, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_12.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_12.RULE", + "matched_text": "http://www.gnu.org/licenses/gpl-3.0.html" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 85, + "end_line": 85, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-3.0", + "rule_identifier": "lgpl-3.0_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_1.RULE", + "matched_text": "http://www.gnu.org/licenses/lgpl-3.0.html" + }, + { + "score": 75.0, + "from_file": "samba/README.contributing", + "start_line": 121, + "end_line": 122, + "matched_length": 12, + "match_coverage": 75.0, + "matcher": "3-seq", + "license_expression": "cc-by-sa-3.0", + "rule_identifier": "cc-by-sa-3.0_10.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-3.0_10.RULE", + "matched_text": "licensed under Creative Commons Attribution-ShareAlike [4].[0] License [as] [found]\n[at] [https]://creativecommons.org/licenses/by-sa/" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 122, + "end_line": 122, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cc-by-sa-4.0", + "rule_identifier": "cc-by-sa-4.0_71.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-4.0_71.RULE", + "matched_text": "https://creativecommons.org/licenses/by-sa/4.0/legalcode" + }, + { + "score": 100.0, + "from_file": "samba/README.contributing", + "start_line": 123, + "end_line": 123, + "matched_length": 7, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "dco-1.1", + "rule_identifier": "dco-1.1_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/dco-1.1_2.RULE", + "matched_text": "Developer's Certificate of Origin 1.1\"" + }, + { + "score": 81.82, + "from_file": "samba/README.md", + "start_line": 6, + "end_line": 6, + "matched_length": 9, + "match_coverage": 81.82, + "matcher": "3-seq", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_1142.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_1142.RULE", + "matched_text": "Free Software licensed under the GNU General Public License" + }, + { + "score": 100.0, + "from_file": "samba/README.md", + "start_line": 22, + "end_line": 24, + "matched_length": 24, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl-1.0-plus_579.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_579.RULE", + "matched_text": "This software is freely distributable under the GNU public license, a\ncopy of which you should have received with this software (in a file\ncalled COPYING)." + }, + { + "score": 100.0, + "from_file": "samba/COPYING", + "start_line": 1, + "end_line": 674, + "matched_length": 5514, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_204.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_204.RULE", + "matched_text": "GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n." + } ] }, { "identifier": "gpl_3_0_plus-494d0068-7138-a14f-4cbb-fd2137263a4f", "license_expression": "gpl-3.0-plus", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "samba/source3/locale/net/genmsg", + "start_line": 5, + "end_line": 16, + "matched_length": 102, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0-plus", + "rule_identifier": "gpl-3.0-plus_290.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0-plus_290.RULE", + "matched_text": "This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, see ." + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/maven_misc/assemble/jackson-dataformat-xml-2.13.5-expected.json b/tests/packagedcode/data/maven_misc/assemble/jackson-dataformat-xml-2.13.5-expected.json index 19db3463d91..204cb2c214e 100644 --- a/tests/packagedcode/data/maven_misc/assemble/jackson-dataformat-xml-2.13.5-expected.json +++ b/tests/packagedcode/data/maven_misc/assemble/jackson-dataformat-xml-2.13.5-expected.json @@ -119,13 +119,59 @@ "detection_count": 2, "detection_log": [ "unknown-reference-to-local-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "jackson-dataformat-xml-2.13.5/META-INF/NOTICE", + "start_line": 11, + "end_line": 13, + "matched_length": 26, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_375.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_375.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "jackson-dataformat-xml-2.13.5/META-INF/LICENSE", + "start_line": 1, + "end_line": 8, + "matched_length": 43, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_394.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_394.RULE", + "matched_text": null + } ] }, { "identifier": "apache_2_0-8607fc22-7931-3e71-b7d5-bd208970dc6f", "license_expression": "apache-2.0", "detection_count": 2, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "jackson-dataformat-xml-2.13.5/META-INF/LICENSE", + "start_line": 1, + "end_line": 8, + "matched_length": 43, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_394.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_394.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/maven_misc/assemble/johnzon-jsonb-1.2.11-expected.json b/tests/packagedcode/data/maven_misc/assemble/johnzon-jsonb-1.2.11-expected.json index 4dd02a8a2f4..e8b3c09660c 100644 --- a/tests/packagedcode/data/maven_misc/assemble/johnzon-jsonb-1.2.11-expected.json +++ b/tests/packagedcode/data/maven_misc/assemble/johnzon-jsonb-1.2.11-expected.json @@ -235,37 +235,133 @@ "detection_count": 2, "detection_log": [ "from-package-file" + ], + "sample_matches": [ + { + "score": 100.0, + "from_file": "johnzon-jsonb-1.2.11/META-INF/maven/org.apache.johnzon/johnzon-jsonb/pom.xml", + "start_line": 3, + "end_line": 18, + "matched_length": 119, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE", + "matched_text": null + } ] }, { "identifier": "apache_2_0-2e855fd2-d4e6-f202-a2a4-6953b9354518", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "johnzon-jsonb-1.2.11/META-INF/MANIFEST.MF", + "start_line": 1, + "end_line": 1, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_42.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_42.RULE", + "matched_text": "http://www.apache.org/licenses/LICENSE-2.0.txt" + } + ] }, { "identifier": "apache_2_0-482220ca-c07b-bf59-66ed-6e7eaf9f3b1e", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 95.0, + "from_file": "johnzon-jsonb-1.2.11/META-INF/NOTICE", + "start_line": 5, + "end_line": 6, + "matched_length": 14, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_product_includes_2.RULE", + "rule_relevance": 95, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_product_includes_2.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-8352cbe6-d199-3a43-cdc8-b14a837e2ce6", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "johnzon-jsonb-1.2.11/META-INF/MANIFEST.MF", + "start_line": 6, + "end_line": 6, + "matched_length": 11, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_osgi.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_osgi.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-aef5c472-cdfd-dc5f-c152-40e3d96f140e", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "johnzon-jsonb-1.2.11/META-INF/LICENSE", + "start_line": 2, + "end_line": 4, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_791.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-f089be2e-5d2c-9289-8733-3880be15665c", "license_expression": "apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 64.18, + "from_file": "johnzon-jsonb-1.2.11/META-INF/DEPENDENCIES", + "start_line": 9, + "end_line": 13, + "matched_length": 43, + "match_coverage": 100.0, + "matcher": "3-seq", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_1247.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1247.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/maven_misc/assemble/numbers-1.7.4-expected.json b/tests/packagedcode/data/maven_misc/assemble/numbers-1.7.4-expected.json index 77fb57fa680..2235fbd90a0 100644 --- a/tests/packagedcode/data/maven_misc/assemble/numbers-1.7.4-expected.json +++ b/tests/packagedcode/data/maven_misc/assemble/numbers-1.7.4-expected.json @@ -106,13 +106,45 @@ "identifier": "cc0_1_0-15f5e40e-1981-f373-7acf-8ebdfa09ee21", "license_expression": "cc0-1.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "numbers-1.7.4/META-INF/maven/com.github.peteroupc/numbers/pom.xml", + "start_line": 86, + "end_line": 91, + "matched_length": 20, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cc0-1.0", + "rule_identifier": "cc0-1.0_197.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc0-1.0_197.RULE", + "matched_text": null + } + ] }, { "identifier": "cc0_1_0-6bdf45cc-fe1e-2f20-02e3-fbae31f10c0e", "license_expression": "cc0-1.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "numbers-1.7.4/META-INF/maven/com.github.peteroupc/numbers/pom.xml", + "start_line": 1, + "end_line": 2, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "cc0-1.0", + "rule_identifier": "cc0-1.0_203.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc0-1.0_203.RULE", + "matched_text": "- name: CC0 Universal\n url: http://www.creativecommons.org/publicdomain/zero/1.0/" + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json b/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json index e22173a6aa3..c261e3175d8 100644 --- a/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json +++ b/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json @@ -576,22 +576,128 @@ { "identifier": "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de", "license_expression": "apache-2.0", - "detection_count": 4 + "detection_count": 4, + "sample_matches": [ + { + "score": 100.0, + "from_file": "htrace-core-4.0.0-incubating/META-INF/maven/commons-logging/commons-logging/pom.xml", + "start_line": 2, + "end_line": 15, + "matched_length": 119, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-482220ca-c07b-bf59-66ed-6e7eaf9f3b1e", "license_expression": "apache-2.0", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 95.0, + "from_file": "htrace-core-4.0.0-incubating/META-INF/NOTICE", + "start_line": 5, + "end_line": 6, + "matched_length": 14, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_product_includes_2.RULE", + "rule_relevance": 95, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_product_includes_2.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-aef5c472-cdfd-dc5f-c152-40e3d96f140e", "license_expression": "apache-2.0", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "htrace-core-4.0.0-incubating/META-INF/LICENSE", + "start_line": 2, + "end_line": 4, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_791.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-e7633baf-a264-a1ab-40f6-a28ec157067a", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "htrace-core-4.0.0-incubating/META-INF/DEPENDENCIES", + "start_line": 11, + "end_line": 11, + "matched_length": 17, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_212.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_212.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "htrace-core-4.0.0-incubating/META-INF/DEPENDENCIES", + "start_line": 13, + "end_line": 13, + "matched_length": 17, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_212.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_212.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "htrace-core-4.0.0-incubating/META-INF/DEPENDENCIES", + "start_line": 15, + "end_line": 15, + "matched_length": 17, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_212.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_212.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "htrace-core-4.0.0-incubating/META-INF/DEPENDENCIES", + "start_line": 19, + "end_line": 19, + "matched_length": 17, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_212.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_212.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/packagedcode/data/pypi/source-package/pip-22.0.4-pypi-package-with-license-expected.json b/tests/packagedcode/data/pypi/source-package/pip-22.0.4-pypi-package-with-license-expected.json index 3470d1434f2..23b872569fe 100644 --- a/tests/packagedcode/data/pypi/source-package/pip-22.0.4-pypi-package-with-license-expected.json +++ b/tests/packagedcode/data/pypi/source-package/pip-22.0.4-pypi-package-with-license-expected.json @@ -117,37 +117,205 @@ { "identifier": "mit-24a5293c-14d7-5403-efac-1a8b7532c0e8", "license_expression": "mit", - "detection_count": 5 + "detection_count": 5, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/PKG-INFO", + "start_line": 15, + "end_line": 15, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "pypi_mit_license.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/PKG-INFO", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] }, { "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/PKG-INFO", + "start_line": 8, + "end_line": 8, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-59433771-4926-870e-d21a-8162cfa060a3", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/PKG-INFO", + "start_line": 27, + "end_line": 27, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_see_license_at_manifest_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see_license_at_manifest_2.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "pip-22.0.4/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-707ccf7a-5c60-0e4c-5844-349c989a00f5", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/setup.cfg", + "start_line": 87, + "end_line": 87, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_see_license_at_manifest_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see_license_at_manifest_2.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "pip-22.0.4/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "pip-22.0.4/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-6e6256c5-00ca-dcb6-8033-2fc4b6ff86be", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/setup.py", + "start_line": 31, + "end_line": 31, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "pip-22.0.4/setup.py", + "start_line": 35, + "end_line": 35, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "pypi_mit_license.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/scancode/data/info/all.expected.json b/tests/scancode/data/info/all.expected.json index 69f67a5ce23..0165793de74 100644 --- a/tests/scancode/data/info/all.expected.json +++ b/tests/scancode/data/info/all.expected.json @@ -3,12 +3,44 @@ { "identifier": "bsd_original_uc-f28cb4d4-6336-ee60-f186-4c1929d3a4b0", "license_expression": "bsd-original-uc", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "basic.tgz/basic/dir2/subdir/bcopy.s", + "start_line": 25, + "end_line": 51, + "matched_length": 243, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-original-uc", + "rule_identifier": "bsd-original-uc_3.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-original-uc_3.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0_or_bsd_new-1aafbf52-fc7a-3ded-e4ce-3a96e276a0f9", "license_expression": "gpl-2.0 OR bsd-new", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "basic.tgz/basic/main.c", + "start_line": 5, + "end_line": 12, + "matched_length": 50, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0 OR bsd-new", + "rule_identifier": "gpl-2.0_or_bsd-new_aes_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_or_bsd-new_aes_1.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/scancode/data/info/all.rooted.expected.json b/tests/scancode/data/info/all.rooted.expected.json index b97e432554f..11749329191 100644 --- a/tests/scancode/data/info/all.rooted.expected.json +++ b/tests/scancode/data/info/all.rooted.expected.json @@ -3,12 +3,44 @@ { "identifier": "bsd_original_uc-f28cb4d4-6336-ee60-f186-4c1929d3a4b0", "license_expression": "bsd-original-uc", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "basic.tgz/basic/dir2/subdir/bcopy.s", + "start_line": 25, + "end_line": 51, + "matched_length": 243, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-original-uc", + "rule_identifier": "bsd-original-uc_3.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-original-uc_3.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0_or_bsd_new-1aafbf52-fc7a-3ded-e4ce-3a96e276a0f9", "license_expression": "gpl-2.0 OR bsd-new", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "basic.tgz/basic/main.c", + "start_line": 5, + "end_line": 12, + "matched_length": 50, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0 OR bsd-new", + "rule_identifier": "gpl-2.0_or_bsd-new_aes_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_or_bsd-new_aes_1.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/scancode/data/license_text/test.expected b/tests/scancode/data/license_text/test.expected index 09da8575aba..d5d0c3e1228 100644 --- a/tests/scancode/data/license_text/test.expected +++ b/tests/scancode/data/license_text/test.expected @@ -4,7 +4,23 @@ "identifier": "lgpl_2_1-694bd705-92dd-1a63-d099-ca6c411c469a", "license_expression": "lgpl-2.1", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "sample_matches": [ + { + "score": 100.0, + "from_file": "test.txt", + "start_line": 1, + "end_line": 1, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.1", + "rule_identifier": "lgpl-2.1_38.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.1_38.RULE", + "matched_text": "license: LGPL-2.1" + } + ] } ], "files": [ diff --git a/tests/scancode/data/plugin_only_findings/basic.expected.json b/tests/scancode/data/plugin_only_findings/basic.expected.json index f638c47b359..9e5053ead0d 100644 --- a/tests/scancode/data/plugin_only_findings/basic.expected.json +++ b/tests/scancode/data/plugin_only_findings/basic.expected.json @@ -5,12 +5,44 @@ { "identifier": "bsd_original_uc-f28cb4d4-6336-ee60-f186-4c1929d3a4b0", "license_expression": "bsd-original-uc", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "basic.tgz/basic/dir2/subdir/bcopy.s", + "start_line": 25, + "end_line": 51, + "matched_length": 243, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "bsd-original-uc", + "rule_identifier": "bsd-original-uc_3.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-original-uc_3.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0_or_bsd_new-1aafbf52-fc7a-3ded-e4ce-3a96e276a0f9", "license_expression": "gpl-2.0 OR bsd-new", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "basic.tgz/basic/main.c", + "start_line": 5, + "end_line": 12, + "matched_length": 50, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0 OR bsd-new", + "rule_identifier": "gpl-2.0_or_bsd-new_aes_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_or_bsd-new_aes_1.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/plugin_consolidate/component-package-build-expected.json b/tests/summarycode/data/plugin_consolidate/component-package-build-expected.json index 47c50fc2fd6..ce267ee3527 100644 --- a/tests/summarycode/data/plugin_consolidate/component-package-build-expected.json +++ b/tests/summarycode/data/plugin_consolidate/component-package-build-expected.json @@ -119,22 +119,86 @@ { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", - "detection_count": 5 + "detection_count": 5, + "sample_matches": [ + { + "score": 100.0, + "from_file": "component-package-build/component/src1", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "component-package-build/package/package.json", + "start_line": 5, + "end_line": 5, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0-864c0c2e-be17-d035-c591-df0235f46a09", "license_expression": "gpl-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "component-package-build/package/src2", + "start_line": 2, + "end_line": 2, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_1336.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_1336.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_2_0-3903e697-0f73-0feb-d95d-198a91825d0f", "license_expression": "lgpl-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 80.0, + "from_file": "component-package-build/component/src4", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.0", + "rule_identifier": "lgpl-2.0_bare_id.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.0_bare_id.RULE", + "matched_text": null + } + ] } ], "consolidated_components": [ diff --git a/tests/summarycode/data/plugin_consolidate/component-package-expected.json b/tests/summarycode/data/plugin_consolidate/component-package-expected.json index facb950aafe..d19ab575369 100644 --- a/tests/summarycode/data/plugin_consolidate/component-package-expected.json +++ b/tests/summarycode/data/plugin_consolidate/component-package-expected.json @@ -73,22 +73,86 @@ { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", - "detection_count": 5 + "detection_count": 5, + "sample_matches": [ + { + "score": 100.0, + "from_file": "component-package/component/src1", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "component-package/package/package.json", + "start_line": 5, + "end_line": 5, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0-864c0c2e-be17-d035-c591-df0235f46a09", "license_expression": "gpl-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "component-package/package/src2", + "start_line": 2, + "end_line": 2, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_1336.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_1336.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_2_0-3903e697-0f73-0feb-d95d-198a91825d0f", "license_expression": "lgpl-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 80.0, + "from_file": "component-package/component/src4", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.0", + "rule_identifier": "lgpl-2.0_bare_id.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.0_bare_id.RULE", + "matched_text": null + } + ] } ], "consolidated_components": [ diff --git a/tests/summarycode/data/plugin_consolidate/license-holder-rollup-expected.json b/tests/summarycode/data/plugin_consolidate/license-holder-rollup-expected.json index 66076f09986..6a63b826430 100644 --- a/tests/summarycode/data/plugin_consolidate/license-holder-rollup-expected.json +++ b/tests/summarycode/data/plugin_consolidate/license-holder-rollup-expected.json @@ -5,12 +5,72 @@ { "identifier": "apache_2_0-b955b3e8-dd31-4357-9227-7a93de3b06a1", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 50.0, + "from_file": "license-holder-rollup/no-majority/foo/baz", + "start_line": 2, + "end_line": 2, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "license-intro_2.RULE", + "rule_relevance": 50, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_2.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "license-holder-rollup/no-majority/foo/baz", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_1_0_plus_and_gpl_2_0-1e023d4a-9b9a-a032-f999-6d506ad4bcde", "license_expression": "gpl-1.0-plus AND gpl-2.0", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "license-holder-rollup/clear-majority/dir1/file1", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_208.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_208.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "license-holder-rollup/clear-majority/dir1/file1", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_840.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_840.RULE", + "matched_text": null + } + ] } ], "consolidated_components": [ diff --git a/tests/summarycode/data/plugin_consolidate/multiple-same-holder-and-license-expected.json b/tests/summarycode/data/plugin_consolidate/multiple-same-holder-and-license-expected.json index 7dd51ccbddb..b97dbfcd388 100644 --- a/tests/summarycode/data/plugin_consolidate/multiple-same-holder-and-license-expected.json +++ b/tests/summarycode/data/plugin_consolidate/multiple-same-holder-and-license-expected.json @@ -5,7 +5,37 @@ { "identifier": "gpl_2_0-20789449-d01b-5c54-146e-d0c746e6368a", "license_expression": "gpl-2.0", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "multiple-same-holder-and-license/bar", + "start_line": 4, + "end_line": 4, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_1074.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_1074.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "multiple-same-holder-and-license/bar", + "start_line": 5, + "end_line": 5, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_1074.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_1074.RULE", + "matched_text": null + } + ] } ], "consolidated_components": [ diff --git a/tests/summarycode/data/plugin_consolidate/package-files-not-counted-in-license-holders-expected.json b/tests/summarycode/data/plugin_consolidate/package-files-not-counted-in-license-holders-expected.json index ff38d4c2f89..d33aa964464 100644 --- a/tests/summarycode/data/plugin_consolidate/package-files-not-counted-in-license-holders-expected.json +++ b/tests/summarycode/data/plugin_consolidate/package-files-not-counted-in-license-holders-expected.json @@ -73,12 +73,44 @@ { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", - "detection_count": 6 + "detection_count": 6, + "sample_matches": [ + { + "score": 100.0, + "from_file": "package-files-not-counted-in-license-holders/src1", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "package-files-not-counted-in-license-holders/package/package.json", + "start_line": 5, + "end_line": 5, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] } ], "consolidated_components": [ diff --git a/tests/summarycode/data/plugin_consolidate/package-fileset-expected.json b/tests/summarycode/data/plugin_consolidate/package-fileset-expected.json index 02d56f52544..5e274c6147e 100644 --- a/tests/summarycode/data/plugin_consolidate/package-fileset-expected.json +++ b/tests/summarycode/data/plugin_consolidate/package-fileset-expected.json @@ -73,12 +73,44 @@ { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", - "detection_count": 4 + "detection_count": 4, + "sample_matches": [ + { + "score": 100.0, + "from_file": "package/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": "apache-2.0" + } + ] }, { "identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "package/package.json", + "start_line": 4, + "end_line": 4, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] } ], "consolidated_components": [ diff --git a/tests/summarycode/data/plugin_consolidate/package-manifest-expected.json b/tests/summarycode/data/plugin_consolidate/package-manifest-expected.json index 316438f8b58..f2a8b741df7 100644 --- a/tests/summarycode/data/plugin_consolidate/package-manifest-expected.json +++ b/tests/summarycode/data/plugin_consolidate/package-manifest-expected.json @@ -73,12 +73,44 @@ { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "package-manifest/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": "apache-2.0" + } + ] }, { "identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "package-manifest/package.json", + "start_line": 4, + "end_line": 4, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] } ], "consolidated_components": [], diff --git a/tests/summarycode/data/plugin_consolidate/report-subdirectory-with-minority-origin-expected.json b/tests/summarycode/data/plugin_consolidate/report-subdirectory-with-minority-origin-expected.json index 7db28dc972f..ba74b946ed9 100644 --- a/tests/summarycode/data/plugin_consolidate/report-subdirectory-with-minority-origin-expected.json +++ b/tests/summarycode/data/plugin_consolidate/report-subdirectory-with-minority-origin-expected.json @@ -5,7 +5,23 @@ { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 4 + "detection_count": 4, + "sample_matches": [ + { + "score": 100.0, + "from_file": "report-subdirectory-with-minority-origin/b", + "start_line": 3, + "end_line": 7, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "consolidated_components": [ diff --git a/tests/summarycode/data/plugin_consolidate/return-nested-local-majority-expected.json b/tests/summarycode/data/plugin_consolidate/return-nested-local-majority-expected.json index a0df1f9a789..fbbc6e68998 100644 --- a/tests/summarycode/data/plugin_consolidate/return-nested-local-majority-expected.json +++ b/tests/summarycode/data/plugin_consolidate/return-nested-local-majority-expected.json @@ -5,12 +5,72 @@ { "identifier": "apache_2_0-b955b3e8-dd31-4357-9227-7a93de3b06a1", "license_expression": "apache-2.0", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 50.0, + "from_file": "return-nested-local-majority/foo/bar", + "start_line": 2, + "end_line": 2, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "license-intro_2.RULE", + "rule_relevance": 50, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_2.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "return-nested-local-majority/foo/bar", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_1_0_plus_and_gpl_2_0-1e023d4a-9b9a-a032-f999-6d506ad4bcde", "license_expression": "gpl-1.0-plus AND gpl-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "return-nested-local-majority/foo/local-majority/baz", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_208.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_208.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "return-nested-local-majority/foo/local-majority/baz", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_840.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_840.RULE", + "matched_text": null + } + ] } ], "consolidated_components": [ diff --git a/tests/summarycode/data/score/basic-expected.json b/tests/summarycode/data/score/basic-expected.json index a2a6ca2cfd4..e8cde4591c7 100644 --- a/tests/summarycode/data/score/basic-expected.json +++ b/tests/summarycode/data/score/basic-expected.json @@ -276,17 +276,65 @@ { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "basic/index.js", + "start_line": 2, + "end_line": 19, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "basic/package.json", + "start_line": 7, + "end_line": 7, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "basic/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] } ], "files": [ diff --git a/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json b/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json index a38530c2a3f..74b9d9a0183 100644 --- a/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json +++ b/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json @@ -276,22 +276,86 @@ { "identifier": "gpl_2_0_plus-1db96703-cb36-48f4-1493-265d3d85eb9e", "license_expression": "gpl-2.0-plus", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "inconsistent_licenses_copyleft/util.js", + "start_line": 1, + "end_line": 1, + "matched_length": 8, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "spdx-license-identifier-gpl-2.0-plus-d77dcfd90692f92e4c8cd586b28797e4f3d067f3", + "rule_relevance": 100, + "rule_url": null, + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "inconsistent_licenses_copyleft/index.js", + "start_line": 2, + "end_line": 19, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "inconsistent_licenses_copyleft/package.json", + "start_line": 7, + "end_line": 7, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "inconsistent_licenses_copyleft/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] } ], "files": [ diff --git a/tests/summarycode/data/score/jar-expected.json b/tests/summarycode/data/score/jar-expected.json index 4ccfa315c31..2f0130a5f17 100644 --- a/tests/summarycode/data/score/jar-expected.json +++ b/tests/summarycode/data/score/jar-expected.json @@ -228,22 +228,100 @@ { "identifier": "apache_2_0-ab23f79b-ec38-9a8a-9b23-85059407f34d", "license_expression": "apache-2.0", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "jar/META-INF/LICENSE.txt", + "start_line": 2, + "end_line": 202, + "matched_length": 1584, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d", "license_expression": "apache-2.0", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "jar/org/jboss/logging/AbstractLoggerProvider.java", + "start_line": 6, + "end_line": 16, + "matched_length": 85, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_7.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_7.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-4800df2e-4a56-bac0-cac1-9fd31da23344", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "jar/META-INF/maven/org.jboss.logging/jboss-logging/pom.xml", + "start_line": 24, + "end_line": 30, + "matched_length": 25, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_1227.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1227.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-efc1b129-3bcc-a9c0-71ea-964bc53d5512", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "jar/META-INF/maven/org.jboss.logging/jboss-logging/pom.xml", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_48.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_48.RULE", + "matched_text": "- name: Apache License, version 2.0" + }, + { + "score": 100.0, + "from_file": "jar/META-INF/maven/org.jboss.logging/jboss-logging/pom.xml", + "start_line": 2, + "end_line": 2, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_42.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_42.RULE", + "matched_text": " url: http://www.apache.org/licenses/LICENSE-2.0.txt" + } + ] } ], "files": [ diff --git a/tests/summarycode/data/score/no_license_ambiguity-expected.json b/tests/summarycode/data/score/no_license_ambiguity-expected.json index f551ac0695d..b3bcb19cca9 100644 --- a/tests/summarycode/data/score/no_license_ambiguity-expected.json +++ b/tests/summarycode/data/score/no_license_ambiguity-expected.json @@ -100,32 +100,170 @@ { "identifier": "apache_2_0-e3938c59-cc73-037c-3372-e20c26c25f48", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "no_license_ambiguity/LICENSE-APACHE", + "start_line": 1, + "end_line": 176, + "matched_length": 1410, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_875.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_875.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0_and__apache_2_0_or_mit-7ff6dd9d-b5e8-3fa4-dd61-c5a634c9b300", "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 94.12, + "from_file": "no_license_ambiguity/COPYRIGHT", + "start_line": 1, + "end_line": 7, + "matched_length": 48, + "match_coverage": 100.0, + "matcher": "3-seq", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_1060.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1060.RULE", + "matched_text": null + }, + { + "score": 97.83, + "from_file": "no_license_ambiguity/COPYRIGHT", + "start_line": 6, + "end_line": 9, + "matched_length": 45, + "match_coverage": 100.0, + "matcher": "3-seq", + "license_expression": "apache-2.0 OR mit", + "rule_identifier": "apache-2.0_or_mit_47.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_47.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-a9138d4e-bc0e-0a20-76fd-237047e6d41c", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 57.69, + "from_file": "no_license_ambiguity/README.md", + "start_line": 152, + "end_line": 157, + "matched_length": 15, + "match_coverage": 57.69, + "matcher": "3-seq", + "license_expression": "mit OR apache-2.0", + "rule_identifier": "mit_or_apache-2.0_9.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_9.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "no_license_ambiguity/README.md", + "start_line": 157, + "end_line": 157, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_154.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_154.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "no_license_ambiguity/LICENSE-MIT", + "start_line": 4, + "end_line": 26, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "no_license_ambiguity/LICENSE-MIT", + "start_line": 4, + "end_line": 26, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit_or_apache_2_0-480eec53-1a80-0150-7c7e-39cf79c9f3a8", "license_expression": "mit OR apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "no_license_ambiguity/Cargo.toml", + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "mit OR apache-2.0", + "rule_identifier": "mit_or_apache-2.0_15.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_15.RULE", + "matched_text": "MIT OR Apache-2.0" + } + ] }, { "identifier": "mit_or_apache_2_0-719f8427-422e-8023-c20e-9f8dd0af13b9", "license_expression": "mit OR apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "no_license_ambiguity/Cargo.toml", + "start_line": 5, + "end_line": 5, + "matched_length": 6, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit OR apache-2.0", + "rule_identifier": "mit_or_apache-2.0_14.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_14.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/score/no_license_text-expected.json b/tests/summarycode/data/score/no_license_text-expected.json index f3bf69da22b..e16e4827479 100644 --- a/tests/summarycode/data/score/no_license_text-expected.json +++ b/tests/summarycode/data/score/no_license_text-expected.json @@ -276,12 +276,44 @@ { "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "no_license_text/package.json", + "start_line": 7, + "end_line": 7, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "no_license_text/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/conflicting_license_categories/conflicting_license_categories.expected.json b/tests/summarycode/data/summary/conflicting_license_categories/conflicting_license_categories.expected.json index 7d358d4dfb1..b59765c8b28 100644 --- a/tests/summarycode/data/summary/conflicting_license_categories/conflicting_license_categories.expected.json +++ b/tests/summarycode/data/summary/conflicting_license_categories/conflicting_license_categories.expected.json @@ -52,22 +52,128 @@ { "identifier": "apache_2_0-9804422e-94ac-ad40-b53a-ee6f8ddb7a3b", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/apache-2.0.LICENSE", + "start_line": 1, + "end_line": 176, + "matched_length": 1410, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_93.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_93.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0_and__apache_2_0_or_mit-9b638e72-e872-a67f-3447-eec297ef7b39", "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 80.0, + "from_file": "codebase/src/a.py", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_73.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_73.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "codebase/src/a.py", + "start_line": 3, + "end_line": 3, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0 OR mit", + "rule_identifier": "apache-2.0_or_mit_36.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_1_0_plus_and_gpl_2_0_and_gpl_2_0_plus-d3814696-f4d1-6a85-1134-6baea31b797a", "license_expression": "gpl-1.0-plus AND gpl-2.0 AND gpl-2.0-plus", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/tests/test_a.py", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-1.0-plus", + "rule_identifier": "gpl_208.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_208.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "codebase/tests/test_a.py", + "start_line": 2, + "end_line": 2, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0", + "rule_identifier": "gpl-2.0_840.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_840.RULE", + "matched_text": null + }, + { + "score": 50.0, + "from_file": "codebase/tests/test_a.py", + "start_line": 2, + "end_line": 2, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "spdx_license_id_gpl-2.0-or-later_for_gpl-2.0-plus.RULE", + "rule_relevance": 50, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_gpl-2.0-or-later_for_gpl-2.0-plus.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/mit.LICENSE", + "start_line": 1, + "end_line": 18, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/end-2-end/bug-1141.expected.json b/tests/summarycode/data/summary/end-2-end/bug-1141.expected.json index d409b0dea6c..276c8533b43 100644 --- a/tests/summarycode/data/summary/end-2-end/bug-1141.expected.json +++ b/tests/summarycode/data/summary/end-2-end/bug-1141.expected.json @@ -40,12 +40,44 @@ { "identifier": "gpl_2_0_plus-9b44ef18-69db-1b2d-f6ce-dd439fc51603", "license_expression": "gpl-2.0-plus", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "bug-1141.tar.gz/bug/sub/sub2/src/benchmark.c", + "start_line": 8, + "end_line": 19, + "matched_length": 102, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_119.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_119.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_3_0_plus-494d0068-7138-a14f-4cbb-fd2137263a4f", "license_expression": "gpl-3.0-plus", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "bug-1141.tar.gz/bug/sub/sub2/COPYING", + "start_line": 1, + "end_line": 12, + "matched_length": 102, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-3.0-plus", + "rule_identifier": "gpl-3.0-plus_290.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0-plus_290.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/holders/clear_holder.expected.json b/tests/summarycode/data/summary/holders/clear_holder.expected.json index 83b9be21626..4c313150bab 100644 --- a/tests/summarycode/data/summary/holders/clear_holder.expected.json +++ b/tests/summarycode/data/summary/holders/clear_holder.expected.json @@ -40,17 +40,79 @@ { "identifier": "apache_2_0-9804422e-94ac-ad40-b53a-ee6f8ddb7a3b", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "clear_holder/apache-2.0.LICENSE", + "start_line": 1, + "end_line": 176, + "matched_length": 1410, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_93.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_93.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0_and__apache_2_0_or_mit-9b638e72-e872-a67f-3447-eec297ef7b39", "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 80.0, + "from_file": "clear_holder/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_73.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_73.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "clear_holder/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0 OR mit", + "rule_identifier": "apache-2.0_or_mit_36.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "clear_holder/mit.LICENSE", + "start_line": 1, + "end_line": 18, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/holders/combined_holders.expected.json b/tests/summarycode/data/summary/holders/combined_holders.expected.json index 01c789a9e4c..3b0c6251ab6 100644 --- a/tests/summarycode/data/summary/holders/combined_holders.expected.json +++ b/tests/summarycode/data/summary/holders/combined_holders.expected.json @@ -36,17 +36,79 @@ { "identifier": "apache_2_0-9804422e-94ac-ad40-b53a-ee6f8ddb7a3b", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "combined_holders/apache-2.0.LICENSE", + "start_line": 1, + "end_line": 176, + "matched_length": 1410, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_93.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_93.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0_and__apache_2_0_or_mit-9b638e72-e872-a67f-3447-eec297ef7b39", "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 80.0, + "from_file": "combined_holders/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_73.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_73.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "combined_holders/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0 OR mit", + "rule_identifier": "apache-2.0_or_mit_36.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "combined_holders/mit.LICENSE", + "start_line": 1, + "end_line": 18, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/license_ambiguity/ambiguous.expected.json b/tests/summarycode/data/summary/license_ambiguity/ambiguous.expected.json index 6fc56345ef9..c265ad864b9 100644 --- a/tests/summarycode/data/summary/license_ambiguity/ambiguous.expected.json +++ b/tests/summarycode/data/summary/license_ambiguity/ambiguous.expected.json @@ -40,12 +40,44 @@ { "identifier": "apache_2_0-9804422e-94ac-ad40-b53a-ee6f8ddb7a3b", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "ambiguous/apache-2.0.LICENSE", + "start_line": 1, + "end_line": 176, + "matched_length": 1410, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_93.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_93.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "ambiguous/mit.LICENSE", + "start_line": 1, + "end_line": 18, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/license_ambiguity/unambiguous.expected.json b/tests/summarycode/data/summary/license_ambiguity/unambiguous.expected.json index 9254000dc23..1c61bf4ef00 100644 --- a/tests/summarycode/data/summary/license_ambiguity/unambiguous.expected.json +++ b/tests/summarycode/data/summary/license_ambiguity/unambiguous.expected.json @@ -36,17 +36,79 @@ { "identifier": "apache_2_0-9804422e-94ac-ad40-b53a-ee6f8ddb7a3b", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "unambiguous/apache-2.0.LICENSE", + "start_line": 1, + "end_line": 176, + "matched_length": 1410, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_93.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_93.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0_and__apache_2_0_or_mit-9b638e72-e872-a67f-3447-eec297ef7b39", "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 80.0, + "from_file": "unambiguous/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_73.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_73.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "unambiguous/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0 OR mit", + "rule_identifier": "apache-2.0_or_mit_36.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "unambiguous/mit.LICENSE", + "start_line": 1, + "end_line": 18, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/multiple_package_data/multiple_package_data.expected.json b/tests/summarycode/data/summary/multiple_package_data/multiple_package_data.expected.json index 9b9a44ad671..cef14c7d2d8 100644 --- a/tests/summarycode/data/summary/multiple_package_data/multiple_package_data.expected.json +++ b/tests/summarycode/data/summary/multiple_package_data/multiple_package_data.expected.json @@ -191,37 +191,163 @@ { "identifier": "apache_2_0-9804422e-94ac-ad40-b53a-ee6f8ddb7a3b", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/apache-2.0.LICENSE", + "start_line": 1, + "end_line": 176, + "matched_length": 1410, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_93.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_93.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": "apache-2.0" + } + ] }, { "identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/setup.py", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0_and__apache_2_0_or_mit-9b638e72-e872-a67f-3447-eec297ef7b39", "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 80.0, + "from_file": "codebase/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_73.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_73.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "codebase/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0 OR mit", + "rule_identifier": "apache-2.0_or_mit_36.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/cargo.toml", + "start_line": 4, + "end_line": 4, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/cargo.toml", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/mit.LICENSE", + "start_line": 1, + "end_line": 18, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/single_file/single_file.expected.json b/tests/summarycode/data/summary/single_file/single_file.expected.json index 226abde6257..2deb21c5ab5 100644 --- a/tests/summarycode/data/summary/single_file/single_file.expected.json +++ b/tests/summarycode/data/summary/single_file/single_file.expected.json @@ -22,7 +22,23 @@ { "identifier": "jetty-a0130d29-e7f1-bc37-111a-fccd6b1c6b58", "license_expression": "jetty", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/jetty.LICENSE", + "start_line": 1, + "end_line": 132, + "matched_length": 996, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "jetty", + "rule_identifier": "jetty.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/jetty.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/summary_without_holder/summary-without-holder-pypi.expected.json b/tests/summarycode/data/summary/summary_without_holder/summary-without-holder-pypi.expected.json index 039b6d6221b..25f98d9947c 100644 --- a/tests/summarycode/data/summary/summary_without_holder/summary-without-holder-pypi.expected.json +++ b/tests/summarycode/data/summary/summary_without_holder/summary-without-holder-pypi.expected.json @@ -131,37 +131,205 @@ { "identifier": "mit-24a5293c-14d7-5403-efac-1a8b7532c0e8", "license_expression": "mit", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/PKG-INFO", + "start_line": 13, + "end_line": 13, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "pypi_mit_license.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-707ccf7a-5c60-0e4c-5844-349c989a00f5", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/setup.cfg", + "start_line": 87, + "end_line": 87, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_see_license_at_manifest_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see_license_at_manifest_2.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "pip-22.0.4/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "pip-22.0.4/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/PKG-INFO", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/PKG-INFO", + "start_line": 6, + "end_line": 6, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-59433771-4926-870e-d21a-8162cfa060a3", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/PKG-INFO", + "start_line": 25, + "end_line": 25, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "unknown-license-reference", + "rule_identifier": "unknown-license-reference_see_license_at_manifest_2.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see_license_at_manifest_2.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "pip-22.0.4/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-6e6256c5-00ca-dcb6-8033-2fc4b6ff86be", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "pip-22.0.4/setup.py", + "start_line": 31, + "end_line": 31, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "pip-22.0.4/setup.py", + "start_line": 35, + "end_line": 35, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "pypi_mit_license.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/use_holder_from_package_resource/use_holder_from_package_resource.expected.json b/tests/summarycode/data/summary/use_holder_from_package_resource/use_holder_from_package_resource.expected.json index 970a6a633ca..4b89d366e57 100644 --- a/tests/summarycode/data/summary/use_holder_from_package_resource/use_holder_from_package_resource.expected.json +++ b/tests/summarycode/data/summary/use_holder_from_package_resource/use_holder_from_package_resource.expected.json @@ -122,7 +122,23 @@ { "identifier": "apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d", "license_expression": "apache-2.0", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/setup.py", + "start_line": 4, + "end_line": 14, + "matched_length": 85, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_7.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_7.RULE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/with_package_data/with_package_data.expected.json b/tests/summarycode/data/summary/with_package_data/with_package_data.expected.json index ab4f946abcf..c4c3abff36b 100644 --- a/tests/summarycode/data/summary/with_package_data/with_package_data.expected.json +++ b/tests/summarycode/data/summary/with_package_data/with_package_data.expected.json @@ -112,27 +112,121 @@ { "identifier": "apache_2_0-9804422e-94ac-ad40-b53a-ee6f8ddb7a3b", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/apache-2.0.LICENSE", + "start_line": 1, + "end_line": 176, + "matched_length": 1410, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_93.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_93.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/setup.py", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE", + "matched_text": "apache-2.0" + } + ] }, { "identifier": "apache_2_0-ec759ae0-ea5a-f138-793e-388520e080c0", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/setup.py", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0_and__apache_2_0_or_mit-9b638e72-e872-a67f-3447-eec297ef7b39", "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 80.0, + "from_file": "codebase/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_73.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_73.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "codebase/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0 OR mit", + "rule_identifier": "apache-2.0_or_mit_36.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/mit.LICENSE", + "start_line": 1, + "end_line": 18, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/summary/without_package_data/without_package_data.expected.json b/tests/summarycode/data/summary/without_package_data/without_package_data.expected.json index b0b8425c6d1..a7e6ae5abf5 100644 --- a/tests/summarycode/data/summary/without_package_data/without_package_data.expected.json +++ b/tests/summarycode/data/summary/without_package_data/without_package_data.expected.json @@ -36,17 +36,79 @@ { "identifier": "apache_2_0-9804422e-94ac-ad40-b53a-ee6f8ddb7a3b", "license_expression": "apache-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/apache-2.0.LICENSE", + "start_line": 1, + "end_line": 176, + "matched_length": 1410, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_93.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_93.RULE", + "matched_text": null + } + ] }, { "identifier": "apache_2_0_and__apache_2_0_or_mit-9b638e72-e872-a67f-3447-eec297ef7b39", "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 80.0, + "from_file": "codebase/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_73.RULE", + "rule_relevance": 80, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_73.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "codebase/README.txt", + "start_line": 3, + "end_line": 3, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0 OR mit", + "rule_identifier": "apache-2.0_or_mit_36.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "codebase/mit.LICENSE", + "start_line": 1, + "end_line": 18, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] } ], "files": [ diff --git a/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json b/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json index 2cb565ded46..305140d0a18 100644 --- a/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json +++ b/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json @@ -5,12 +5,44 @@ { "identifier": "gpl_2_0_plus-9b44ef18-69db-1b2d-f6ce-dd439fc51603", "license_expression": "gpl-2.0-plus", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "bug-1141.tar.gz/bug/sub/sub2/src/benchmark.c", + "start_line": 8, + "end_line": 19, + "matched_length": 102, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus", + "rule_identifier": "gpl-2.0-plus_119.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_119.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_3_0_plus-494d0068-7138-a14f-4cbb-fd2137263a4f", "license_expression": "gpl-3.0-plus", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "bug-1141.tar.gz/bug/sub/sub2/COPYING", + "start_line": 1, + "end_line": 12, + "matched_length": 102, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "gpl-3.0-plus", + "rule_identifier": "gpl-3.0-plus_290.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0-plus_290.RULE", + "matched_text": null + } + ] } ], "tallies": { diff --git a/tests/summarycode/data/tallies/full_tallies/tallies.expected.json b/tests/summarycode/data/tallies/full_tallies/tallies.expected.json index b531d8553b2..f27ec88be97 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies.expected.json +++ b/tests/summarycode/data/tallies/full_tallies/tallies.expected.json @@ -3335,62 +3335,268 @@ { "identifier": "artistic_2_0-2ca48deb-7b37-fc93-edd9-b349ad073774", "license_expression": "artistic-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 50.0, + "from_file": "scan/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "artistic-2.0", + "rule_identifier": "spdx_license_id_artistic-2.0_for_artistic-2.0.RULE", + "rule_relevance": 50, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_artistic-2.0_for_artistic-2.0.RULE", + "matched_text": "Artistic-2.0" + } + ] }, { "identifier": "artistic_2_0-c1ede1c6-eb3d-61cc-53ad-abba5e17c732", "license_expression": "artistic-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/package.json", + "start_line": 198, + "end_line": 198, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "artistic-2.0", + "rule_identifier": "artistic-2.0_46.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-2.0_46.RULE", + "matched_text": null + } + ] }, { "identifier": "boost_1_0-7d91c102-4b73-b55e-398c-cca7ae1e7bf5", "license_expression": "boost-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/dotzlib/ChecksumImpl.cs", + "start_line": 4, + "end_line": 5, + "matched_length": 32, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "boost-1.0", + "rule_identifier": "boost-1.0_21.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/boost-1.0_21.RULE", + "matched_text": null + } + ] }, { "identifier": "cc_by_2_5-2664cdba-0ee6-a527-2588-8a3a1be3ecae", "license_expression": "cc-by-2.5", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/GuardedBy.java", + "start_line": 4, + "end_line": 5, + "matched_length": 14, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cc-by-2.5", + "rule_identifier": "cc-by-2.5_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-2.5_4.RULE", + "matched_text": null + } + ] }, { "identifier": "cc0_1_0-4be2dd81-b884-28ac-690a-75aff1b0e963", "license_expression": "cc0-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 99.69, + "from_file": "scan/cc0-1.0.LICENSE", + "start_line": 1, + "end_line": 98, + "matched_length": 978, + "match_coverage": 99.69, + "matcher": "3-seq", + "license_expression": "cc0-1.0", + "rule_identifier": "cc0-1.0_155.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc0-1.0_155.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0_plus_with_ada_linking_exception-ca27fab9-344b-58b2-3c05-f3ca150dad7e", "license_expression": "gpl-2.0-plus WITH ada-linking-exception", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/ada/zlib.ads", + "start_line": 6, + "end_line": 25, + "matched_length": 176, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus WITH ada-linking-exception", + "rule_identifier": "gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_2_1_plus-3fe3e5e6-cb18-c0a1-f831-f08fab3612c1", "license_expression": "lgpl-2.1-plus", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/FixedMembershipToken.java", + "start_line": 7, + "end_line": 20, + "matched_length": 125, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.1-plus", + "rule_identifier": "lgpl-2.1-plus_59.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.1-plus_59.RULE", + "matched_text": null + } + ] }, { "identifier": "mit_old_style-578ee504-a9b5-6c26-1bb4-fd7b80a664f0", "license_expression": "mit-old-style", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/iostream2/zstream.h", + "start_line": 9, + "end_line": 15, + "matched_length": 71, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit-old-style", + "rule_identifier": "mit-old-style_cmr-no_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit-old-style_cmr-no_1.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", - "detection_count": 7 + "detection_count": 7, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/adler32.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-b04102d0-a663-78b5-de18-9677ee48ce9c", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-f32ae987-c66a-44ce-bd13-c90e0c59aab8", "license_expression": "zlib", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/gcc_gvmat64/gvmat64.S", + "start_line": 17, + "end_line": 31, + "matched_length": 132, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/zlib.LICENSE", + "matched_text": null + } + ] } ], "tallies": { diff --git a/tests/summarycode/data/tallies/full_tallies/tallies_by_facet.expected.json b/tests/summarycode/data/tallies/full_tallies/tallies_by_facet.expected.json index 5d100e63f2f..99e94abf9a4 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies_by_facet.expected.json +++ b/tests/summarycode/data/tallies/full_tallies/tallies_by_facet.expected.json @@ -3335,62 +3335,268 @@ { "identifier": "artistic_2_0-2ca48deb-7b37-fc93-edd9-b349ad073774", "license_expression": "artistic-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 50.0, + "from_file": "scan/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "artistic-2.0", + "rule_identifier": "spdx_license_id_artistic-2.0_for_artistic-2.0.RULE", + "rule_relevance": 50, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_artistic-2.0_for_artistic-2.0.RULE", + "matched_text": "Artistic-2.0" + } + ] }, { "identifier": "artistic_2_0-c1ede1c6-eb3d-61cc-53ad-abba5e17c732", "license_expression": "artistic-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/package.json", + "start_line": 198, + "end_line": 198, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "artistic-2.0", + "rule_identifier": "artistic-2.0_46.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-2.0_46.RULE", + "matched_text": null + } + ] }, { "identifier": "boost_1_0-7d91c102-4b73-b55e-398c-cca7ae1e7bf5", "license_expression": "boost-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/dotzlib/ChecksumImpl.cs", + "start_line": 4, + "end_line": 5, + "matched_length": 32, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "boost-1.0", + "rule_identifier": "boost-1.0_21.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/boost-1.0_21.RULE", + "matched_text": null + } + ] }, { "identifier": "cc_by_2_5-2664cdba-0ee6-a527-2588-8a3a1be3ecae", "license_expression": "cc-by-2.5", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/GuardedBy.java", + "start_line": 4, + "end_line": 5, + "matched_length": 14, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cc-by-2.5", + "rule_identifier": "cc-by-2.5_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-2.5_4.RULE", + "matched_text": null + } + ] }, { "identifier": "cc0_1_0-4be2dd81-b884-28ac-690a-75aff1b0e963", "license_expression": "cc0-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 99.69, + "from_file": "scan/cc0-1.0.LICENSE", + "start_line": 1, + "end_line": 98, + "matched_length": 978, + "match_coverage": 99.69, + "matcher": "3-seq", + "license_expression": "cc0-1.0", + "rule_identifier": "cc0-1.0_155.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc0-1.0_155.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0_plus_with_ada_linking_exception-ca27fab9-344b-58b2-3c05-f3ca150dad7e", "license_expression": "gpl-2.0-plus WITH ada-linking-exception", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/ada/zlib.ads", + "start_line": 6, + "end_line": 25, + "matched_length": 176, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus WITH ada-linking-exception", + "rule_identifier": "gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_2_1_plus-3fe3e5e6-cb18-c0a1-f831-f08fab3612c1", "license_expression": "lgpl-2.1-plus", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/FixedMembershipToken.java", + "start_line": 7, + "end_line": 20, + "matched_length": 125, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.1-plus", + "rule_identifier": "lgpl-2.1-plus_59.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.1-plus_59.RULE", + "matched_text": null + } + ] }, { "identifier": "mit_old_style-578ee504-a9b5-6c26-1bb4-fd7b80a664f0", "license_expression": "mit-old-style", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/iostream2/zstream.h", + "start_line": 9, + "end_line": 15, + "matched_length": 71, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit-old-style", + "rule_identifier": "mit-old-style_cmr-no_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit-old-style_cmr-no_1.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", - "detection_count": 7 + "detection_count": 7, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/adler32.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-b04102d0-a663-78b5-de18-9677ee48ce9c", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-f32ae987-c66a-44ce-bd13-c90e0c59aab8", "license_expression": "zlib", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/gcc_gvmat64/gvmat64.S", + "start_line": 17, + "end_line": 31, + "matched_length": 132, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/zlib.LICENSE", + "matched_text": null + } + ] } ], "tallies": { diff --git a/tests/summarycode/data/tallies/full_tallies/tallies_details.expected.json b/tests/summarycode/data/tallies/full_tallies/tallies_details.expected.json index 70f2fd13b5b..117dd3ab6a9 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies_details.expected.json +++ b/tests/summarycode/data/tallies/full_tallies/tallies_details.expected.json @@ -3335,62 +3335,268 @@ { "identifier": "artistic_2_0-2ca48deb-7b37-fc93-edd9-b349ad073774", "license_expression": "artistic-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 50.0, + "from_file": "scan/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "artistic-2.0", + "rule_identifier": "spdx_license_id_artistic-2.0_for_artistic-2.0.RULE", + "rule_relevance": 50, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_artistic-2.0_for_artistic-2.0.RULE", + "matched_text": "Artistic-2.0" + } + ] }, { "identifier": "artistic_2_0-c1ede1c6-eb3d-61cc-53ad-abba5e17c732", "license_expression": "artistic-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/package.json", + "start_line": 198, + "end_line": 198, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "artistic-2.0", + "rule_identifier": "artistic-2.0_46.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-2.0_46.RULE", + "matched_text": null + } + ] }, { "identifier": "boost_1_0-7d91c102-4b73-b55e-398c-cca7ae1e7bf5", "license_expression": "boost-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/dotzlib/ChecksumImpl.cs", + "start_line": 4, + "end_line": 5, + "matched_length": 32, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "boost-1.0", + "rule_identifier": "boost-1.0_21.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/boost-1.0_21.RULE", + "matched_text": null + } + ] }, { "identifier": "cc_by_2_5-2664cdba-0ee6-a527-2588-8a3a1be3ecae", "license_expression": "cc-by-2.5", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/GuardedBy.java", + "start_line": 4, + "end_line": 5, + "matched_length": 14, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cc-by-2.5", + "rule_identifier": "cc-by-2.5_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-2.5_4.RULE", + "matched_text": null + } + ] }, { "identifier": "cc0_1_0-4be2dd81-b884-28ac-690a-75aff1b0e963", "license_expression": "cc0-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 99.69, + "from_file": "scan/cc0-1.0.LICENSE", + "start_line": 1, + "end_line": 98, + "matched_length": 978, + "match_coverage": 99.69, + "matcher": "3-seq", + "license_expression": "cc0-1.0", + "rule_identifier": "cc0-1.0_155.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc0-1.0_155.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0_plus_with_ada_linking_exception-ca27fab9-344b-58b2-3c05-f3ca150dad7e", "license_expression": "gpl-2.0-plus WITH ada-linking-exception", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/ada/zlib.ads", + "start_line": 6, + "end_line": 25, + "matched_length": 176, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus WITH ada-linking-exception", + "rule_identifier": "gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_2_1_plus-3fe3e5e6-cb18-c0a1-f831-f08fab3612c1", "license_expression": "lgpl-2.1-plus", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/FixedMembershipToken.java", + "start_line": 7, + "end_line": 20, + "matched_length": 125, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.1-plus", + "rule_identifier": "lgpl-2.1-plus_59.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.1-plus_59.RULE", + "matched_text": null + } + ] }, { "identifier": "mit_old_style-578ee504-a9b5-6c26-1bb4-fd7b80a664f0", "license_expression": "mit-old-style", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/iostream2/zstream.h", + "start_line": 9, + "end_line": 15, + "matched_length": 71, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit-old-style", + "rule_identifier": "mit-old-style_cmr-no_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit-old-style_cmr-no_1.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", - "detection_count": 7 + "detection_count": 7, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/adler32.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-b04102d0-a663-78b5-de18-9677ee48ce9c", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-f32ae987-c66a-44ce-bd13-c90e0c59aab8", "license_expression": "zlib", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/gcc_gvmat64/gvmat64.S", + "start_line": 17, + "end_line": 31, + "matched_length": 132, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/zlib.LICENSE", + "matched_text": null + } + ] } ], "tallies": { diff --git a/tests/summarycode/data/tallies/full_tallies/tallies_key_files-details.expected.json-lines b/tests/summarycode/data/tallies/full_tallies/tallies_key_files-details.expected.json-lines index 9042d65ef6b..537005b533d 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies_key_files-details.expected.json-lines +++ b/tests/summarycode/data/tallies/full_tallies/tallies_key_files-details.expected.json-lines @@ -37,57 +37,247 @@ { "identifier": "artistic_2_0-c1ede1c6-eb3d-61cc-53ad-abba5e17c732", "license_expression": "artistic-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/package.json", + "start_line": 198, + "end_line": 198, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "artistic-2.0", + "rule_identifier": "artistic-2.0_46.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-2.0_46.RULE", + "matched_text": null + } + ] }, { "identifier": "boost_1_0-7d91c102-4b73-b55e-398c-cca7ae1e7bf5", "license_expression": "boost-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/dotzlib/ChecksumImpl.cs", + "start_line": 4, + "end_line": 5, + "matched_length": 32, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "boost-1.0", + "rule_identifier": "boost-1.0_21.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/boost-1.0_21.RULE", + "matched_text": null + } + ] }, { "identifier": "cc_by_2_5-2664cdba-0ee6-a527-2588-8a3a1be3ecae", "license_expression": "cc-by-2.5", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/GuardedBy.java", + "start_line": 4, + "end_line": 5, + "matched_length": 14, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cc-by-2.5", + "rule_identifier": "cc-by-2.5_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-2.5_4.RULE", + "matched_text": null + } + ] }, { "identifier": "cc0_1_0-4be2dd81-b884-28ac-690a-75aff1b0e963", "license_expression": "cc0-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 99.69, + "from_file": "scan/cc0-1.0.LICENSE", + "start_line": 1, + "end_line": 98, + "matched_length": 978, + "match_coverage": 99.69, + "matcher": "3-seq", + "license_expression": "cc0-1.0", + "rule_identifier": "cc0-1.0_155.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc0-1.0_155.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0_plus_with_ada_linking_exception-ca27fab9-344b-58b2-3c05-f3ca150dad7e", "license_expression": "gpl-2.0-plus WITH ada-linking-exception", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/ada/zlib.ads", + "start_line": 6, + "end_line": 25, + "matched_length": 176, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus WITH ada-linking-exception", + "rule_identifier": "gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_2_1_plus-3fe3e5e6-cb18-c0a1-f831-f08fab3612c1", "license_expression": "lgpl-2.1-plus", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/FixedMembershipToken.java", + "start_line": 7, + "end_line": 20, + "matched_length": 125, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.1-plus", + "rule_identifier": "lgpl-2.1-plus_59.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.1-plus_59.RULE", + "matched_text": null + } + ] }, { "identifier": "mit_old_style-578ee504-a9b5-6c26-1bb4-fd7b80a664f0", "license_expression": "mit-old-style", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/iostream2/zstream.h", + "start_line": 9, + "end_line": 15, + "matched_length": 71, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit-old-style", + "rule_identifier": "mit-old-style_cmr-no_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit-old-style_cmr-no_1.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", - "detection_count": 7 + "detection_count": 7, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/adler32.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-b04102d0-a663-78b5-de18-9677ee48ce9c", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-f32ae987-c66a-44ce-bd13-c90e0c59aab8", "license_expression": "zlib", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/gcc_gvmat64/gvmat64.S", + "start_line": 17, + "end_line": 31, + "matched_length": 132, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/zlib.LICENSE", + "matched_text": null + } + ] } ] }, diff --git a/tests/summarycode/data/tallies/full_tallies/tallies_key_files.expected.json b/tests/summarycode/data/tallies/full_tallies/tallies_key_files.expected.json index 25709d6bad8..e51ee97ca86 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies_key_files.expected.json +++ b/tests/summarycode/data/tallies/full_tallies/tallies_key_files.expected.json @@ -3,57 +3,247 @@ { "identifier": "artistic_2_0-c1ede1c6-eb3d-61cc-53ad-abba5e17c732", "license_expression": "artistic-2.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/package.json", + "start_line": 198, + "end_line": 198, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "artistic-2.0", + "rule_identifier": "artistic-2.0_46.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-2.0_46.RULE", + "matched_text": null + } + ] }, { "identifier": "boost_1_0-7d91c102-4b73-b55e-398c-cca7ae1e7bf5", "license_expression": "boost-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/dotzlib/ChecksumImpl.cs", + "start_line": 4, + "end_line": 5, + "matched_length": 32, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "boost-1.0", + "rule_identifier": "boost-1.0_21.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/boost-1.0_21.RULE", + "matched_text": null + } + ] }, { "identifier": "cc_by_2_5-2664cdba-0ee6-a527-2588-8a3a1be3ecae", "license_expression": "cc-by-2.5", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/GuardedBy.java", + "start_line": 4, + "end_line": 5, + "matched_length": 14, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "cc-by-2.5", + "rule_identifier": "cc-by-2.5_4.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-2.5_4.RULE", + "matched_text": null + } + ] }, { "identifier": "cc0_1_0-4be2dd81-b884-28ac-690a-75aff1b0e963", "license_expression": "cc0-1.0", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 99.69, + "from_file": "scan/cc0-1.0.LICENSE", + "start_line": 1, + "end_line": 98, + "matched_length": 978, + "match_coverage": 99.69, + "matcher": "3-seq", + "license_expression": "cc0-1.0", + "rule_identifier": "cc0-1.0_155.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc0-1.0_155.RULE", + "matched_text": null + } + ] }, { "identifier": "gpl_2_0_plus_with_ada_linking_exception-ca27fab9-344b-58b2-3c05-f3ca150dad7e", "license_expression": "gpl-2.0-plus WITH ada-linking-exception", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/ada/zlib.ads", + "start_line": 6, + "end_line": 25, + "matched_length": 176, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-2.0-plus WITH ada-linking-exception", + "rule_identifier": "gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_with_ada-linking-exception_1.RULE", + "matched_text": null + } + ] }, { "identifier": "lgpl_2_1_plus-3fe3e5e6-cb18-c0a1-f831-f08fab3612c1", "license_expression": "lgpl-2.1-plus", - "detection_count": 3 + "detection_count": 3, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/JGroups/src/FixedMembershipToken.java", + "start_line": 7, + "end_line": 20, + "matched_length": 125, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "lgpl-2.1-plus", + "rule_identifier": "lgpl-2.1-plus_59.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.1-plus_59.RULE", + "matched_text": null + } + ] }, { "identifier": "mit_old_style-578ee504-a9b5-6c26-1bb4-fd7b80a664f0", "license_expression": "mit-old-style", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/iostream2/zstream.h", + "start_line": 9, + "end_line": 15, + "matched_length": 71, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit-old-style", + "rule_identifier": "mit-old-style_cmr-no_1.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit-old-style_cmr-no_1.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", - "detection_count": 7 + "detection_count": 7, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/adler32.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matched_length": 12, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_5.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-b04102d0-a663-78b5-de18-9677ee48ce9c", "license_expression": "zlib", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matched_length": 144, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib_17.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE", + "matched_text": null + } + ] }, { "identifier": "zlib-f32ae987-c66a-44ce-bd13-c90e0c59aab8", "license_expression": "zlib", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "scan/zlib/gcc_gvmat64/gvmat64.S", + "start_line": 17, + "end_line": 31, + "matched_length": 132, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "zlib", + "rule_identifier": "zlib.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/zlib.LICENSE", + "matched_text": null + } + ] } ], "tallies": { diff --git a/tests/summarycode/data/todo/no_todo/base64-arraybuffer.expected.json b/tests/summarycode/data/todo/no_todo/base64-arraybuffer.expected.json index e165c57a400..895ad071100 100644 --- a/tests/summarycode/data/todo/no_todo/base64-arraybuffer.expected.json +++ b/tests/summarycode/data/todo/no_todo/base64-arraybuffer.expected.json @@ -172,27 +172,121 @@ { "identifier": "mit-e634e936-0701-7555-bfaa-1fce0c174838", "license_expression": "mit", - "detection_count": 2 + "detection_count": 2, + "sample_matches": [ + { + "score": 100.0, + "from_file": "base64-arraybuffer-0.1.4/README.md", + "start_line": 20, + "end_line": 20, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_12.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_12.RULE", + "matched_text": null + } + ] }, { "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "base64-arraybuffer-0.1.4/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": "https://github.com/niklasvh/base64-arraybuffer/blob/master/LICENSE-MIT" + } + ] }, { "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "base64-arraybuffer-0.1.4/package.json", + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ] }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "base64-arraybuffer-0.1.4/LICENSE-MIT", + "start_line": 3, + "end_line": 22, + "matched_length": 161, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit.LICENSE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": null + } + ] }, { "identifier": "mit-f9ae5fa5-0848-4d18-62fc-d668971434b3", "license_expression": "mit", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 100.0, + "from_file": "base64-arraybuffer-0.1.4/package.json", + "start_line": 18, + "end_line": 20, + "matched_length": 3, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_272.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_272.RULE", + "matched_text": null + }, + { + "score": 100.0, + "from_file": "base64-arraybuffer-0.1.4/package.json", + "start_line": 21, + "end_line": 21, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_30.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": null + } + ] } ], "todo": [], diff --git a/tests/summarycode/data/todo/todo_present/unknown-license-expected-diag.json b/tests/summarycode/data/todo/todo_present/unknown-license-expected-diag.json index 037e94ad1a5..7228780685a 100644 --- a/tests/summarycode/data/todo/todo_present/unknown-license-expected-diag.json +++ b/tests/summarycode/data/todo/todo_present/unknown-license-expected-diag.json @@ -6,6 +6,22 @@ "detection_count": 1, "detection_log": [ "unknown-match" + ], + "sample_matches": [ + { + "score": 86.89, + "from_file": "unknown-license.txt", + "start_line": 1, + "end_line": 10, + "matched_length": 53, + "match_coverage": 100.0, + "matcher": "6-unknown", + "license_expression": "unknown", + "rule_identifier": "license-detection-unknown-3d4d4e847eacf4b9efcc80ca90df1eea689f5cee", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "form shall mean the preferred form for making\nthe purposes of this definition control\n[software] [is] [modified] [by] [someone] [else]\n\n\n\nrepresent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) [to] [the] interfaces of,\n the Work and Derivative Works thereof." + } ] } ], diff --git a/tests/summarycode/data/todo/todo_present/unknown-license-expected.json b/tests/summarycode/data/todo/todo_present/unknown-license-expected.json index 4c65a5765c9..3c3eb546e6f 100644 --- a/tests/summarycode/data/todo/todo_present/unknown-license-expected.json +++ b/tests/summarycode/data/todo/todo_present/unknown-license-expected.json @@ -3,7 +3,23 @@ { "identifier": "unknown-b0897d47-1c91-9898-2364-2e4d1a34b6fd", "license_expression": "unknown", - "detection_count": 1 + "detection_count": 1, + "sample_matches": [ + { + "score": 86.89, + "from_file": "unknown-license.txt", + "start_line": 1, + "end_line": 10, + "matched_length": 53, + "match_coverage": 100.0, + "matcher": "6-unknown", + "license_expression": "unknown", + "rule_identifier": "license-detection-unknown-51bcd994ad60981fff8c5f1b1b9af6e3d4f5ba67", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "form shall mean the preferred form for making\nthe purposes of this definition control\nsoftware is modified by someone else\n\n\n\nrepresent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof." + } + ] } ], "todo": [