Repository: CycloneDX/cyclonedx-core-java
Pull request #500 (2024-09-07 15:52:32)

Fix Issue 498
Fix https://github.com/CycloneDX/cyclonedx-core-java/issues/498

codacy-production[bot]: ## Coverage summary from Codacy
### [See diff coverage on Codacy](https://app.codacy.com/gh/CycloneDX/cyclonedx-core-java/coverage/pull-requests/500?utm_source=github.com&utm_medium=coverageSummary&utm_campaign=coverageSummaryPullRequest)

 | Coverage variation | Diff coverage | 
 | ------------- | ------------- |
 | :white_check_mark: **+0.03%** | :white_check_mark: **∅** |

<details>
<summary>Coverage variation details</summary>

| | Coverable lines | Covered lines | Coverage |
| ------------- | ------------- | ------------- | ------------- |
| Common ancestor commit (dde00242ae0271e38a0e4312fad0136d801f219c) | 6033 | 4403 | 72.98% | |
| Head commit (e91811bff7607f55727aca1db863a0db9d4732ae) | 6033 (+0) | 4405 (+2) | 73.02% (**+0.03%**) |

**Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: `<coverage of head commit> - <coverage of common ancestor commit>`
</details>

<details>
<summary>Diff coverage details</summary>

| | Coverable lines | Covered lines | Diff coverage |
| ------------- | ------------- | ------------- | ------------- |
| Pull request (#500) | 0 | 0 | **∅ (not applicable)** |

**Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `<covered lines added or modified>/<coverable lines added or modified> * 100%`
</details>

#### [See your quality gate settings](https://app.codacy.com/gh/CycloneDX/cyclonedx-core-java/settings/quality?utm_source=github.com&utm_medium=coverageSummary&utm_campaign=coverageSummaryGates)&nbsp;&nbsp;&nbsp;&nbsp;[Change summary preferences](https://app.codacy.com/gh/CycloneDX/cyclonedx-core-java/settings/integrations?utm_source=github.com&utm_medium=coverageSummary&utm_campaign=coverageSummarySettings)
<sub>Codacy stopped sending the deprecated coverage status on June 5th, 2024. [Learn more](https://docs.codacy.com/release-notes/cloud/cloud-2023-11-23-new-coverage-engine-status-checks/#deprecation-and-removal-of-the-old-coverage-engine-status-checks)</sub>

<!-- 108f945d-e553-4918-8ccf-027c6d4acc2c -->

Patch:
diff --git a/src/main/java/org/cyclonedx/model/component/evidence/Occurrence.java b/src/main/java/org/cyclonedx/model/component/evidence/Occurrence.java
index 3b888860d..48b396a6c 100644
--- a/src/main/java/org/cyclonedx/model/component/evidence/Occurrence.java
+++ b/src/main/java/org/cyclonedx/model/component/evidence/Occurrence.java
@@ -5,6 +5,7 @@ import java.util.Objects;
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import org.cyclonedx.Version;
@@ -14,6 +15,7 @@ import org.cyclonedx.model.VersionFilter;
 @JsonIgnoreProperties(ignoreUnknown = true)
 @JsonInclude(JsonInclude.Include.NON_EMPTY)
 @JacksonXmlRootElement(localName = "occurrence")
+@JsonPropertyOrder({"bom-ref", "location", "line", "offset", "symbol", "additionalContext"})
 public class Occurrence extends ExtensibleElement
 {
   @JacksonXmlProperty(isAttribute = true, localName = "bom-ref")
@@ -30,7 +32,7 @@ public class Occurrence extends ExtensibleElement
   private Integer offset;
 
   @VersionFilter(Version.VERSION_16)
-  private Integer symbol;
+  private String symbol;
 
   @VersionFilter(Version.VERSION_16)
   private String additionalContext;
@@ -67,11 +69,11 @@ public class Occurrence extends ExtensibleElement
     this.offset = offset;
   }
 
-  public Integer getSymbol() {
+  public String getSymbol() {
     return symbol;
   }
 
-  public void setSymbol(final Integer symbol) {
+  public void setSymbol(final String symbol) {
     this.symbol = symbol;
   }
 


Test patch:
diff --git a/src/test/java/org/cyclonedx/parsers/AbstractParserTest.java b/src/test/java/org/cyclonedx/parsers/AbstractParserTest.java
index bba38d28e..5e4ae675b 100644
--- a/src/test/java/org/cyclonedx/parsers/AbstractParserTest.java
+++ b/src/test/java/org/cyclonedx/parsers/AbstractParserTest.java
@@ -680,9 +680,9 @@ public class AbstractParserTest
     assertEquals("http://www.apache.org/licenses/LICENSE-2.0",
         evidence.getLicenseChoice().getLicenses().get(0).getUrl());
 
-    if (version == Version.VERSION_15) {
+    if (version.getVersion() >= Version.VERSION_15.getVersion()) {
       assertCallStack(evidence.getCallstack());
-      assertOccurrences(evidence.getOccurrences());
+      assertOccurrences(evidence.getOccurrences(), version);
       assertEquals(1, evidence.getIdentities().size());
       assertIdentifiers(evidence.getIdentities().get(0), version);
     }
@@ -693,12 +693,16 @@ public class AbstractParserTest
     }
   }
 
-  private void assertOccurrences(final List<Occurrence> occurrences){
+  private void assertOccurrences(final List<Occurrence> occurrences, Version version){
     assertEquals(occurrences.size(), 1);
     Occurrence occurrence = occurrences.get(0);
 
     assertNotNull(occurrence.getBomRef());
     assertNotNull(occurrence.getLocation());
+
+    if (version.getVersion() >= Version.VERSION_16.getVersion()) {
+      assertNotNull(occurrence.getSymbol());
+    }
   }
 
   private void assertCallStack(final Callstack callstack){
diff --git a/src/test/resources/1.6/valid-bom-1.6.xml b/src/test/resources/1.6/valid-bom-1.6.xml
index 5f94ce13b..0bf0082e4 100644
--- a/src/test/resources/1.6/valid-bom-1.6.xml
+++ b/src/test/resources/1.6/valid-bom-1.6.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6">
     <metadata>
         <timestamp>2020-04-13T20:20:39+00:00</timestamp>
@@ -62,9 +62,8 @@
             </hashes>
             <licenses>
                 <license>
-                    <id>Apache-2.0</id>
-                    <text content-type="text/plain" encoding="base64">CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFwYWNoZSBMaWNlbnNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgIFZlcnNpb24gMi4wLCBKYW51YXJ5IDIwMDQKICAgIC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AgICBpZGVudGlmaWNhdGlvbiB3aXRoaW4gdGhpcmQtcGFydHkgYXJjaGl2ZXMuCgogICBDb3B5cmlnaHQgW3l5eXldIFtuYW1lIG9mIGNvcHlyaWdodCBvd25lcl0KCiAgIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOwogICB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuCiAgIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdAoKICAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMAoKICAgVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQogICBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAogICBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KICAgU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAogICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4=</text>
-                    <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
+                    <id>LGPL-3.0-or-later</id>
+                    <url>https://www.gnu.org/licenses/lgpl-3.0-standalone.html</url>
                 </license>
             </licenses>
             <purl>pkg:maven/com.acme/tomcat-catalina@9.0.14?packaging=jar</purl>
@@ -168,31 +167,47 @@
         <component type="framework">
             <author>Example Super Heros</author>
             <group>com.example</group>
-            <name>myframework</name>
+            <name>example-project</name>
             <version>1.0.0</version>
-            <description>Example Inc, enterprise framework</description>
-            <scope>required</scope>
-            <hashes>
-                <hash alg="MD5">cfcb0b64aacd2f81c1cd546543de965a</hash>
-                <hash alg="SHA-1">7fbeef2346c45d565c3341f037bce4e088af8a52</hash>
-                <hash alg="SHA-256">0384db3cec55d86a6898c489fdb75a8e75fe66b26639634983d2f3c3558493d1</hash>
-                <hash alg="SHA-512">854909cdb9e3ca183056837144aab6d8069b377bd66445087cc7157bf0c3f620418705dd0b83bdc2f73a508c2bdb316ca1809d75ee6972d02023a3e7dd655c79</hash>
-            </hashes>
-            <licenses>
-                <license>
-                    <name>Some random license</name>
-                </license>
-            </licenses>
-            <purl>pkg:maven/com.example/myframework@1.0.0?packaging=war</purl>
-            <modified>false</modified>
-            <externalReferences>
-                <reference type="website">
-                    <url>http://example.com/myframework</url>
-                </reference>
-                <reference type="advisories">
-                    <url>http://example.com/security</url>
-                </reference>
-            </externalReferences>
+            <purl>pkg:maven/com.example/example-project@1.0.0</purl>
+            <evidence>
+                <identity>
+                    <field>group</field>
+                    <confidence>0.1</confidence>
+                    <concludedValue>com.example</concludedValue>
+                    <methods>
+                        <method>
+                            <technique>filename</technique>
+                            <confidence>0.1</confidence>
+                            <value>example-project-1.0.0.jar</value>
+                        </method>
+                    </methods>
+                </identity>
+                <identity>
+                    <field>name</field>
+                    <confidence>0.1</confidence>
+                    <concludedValue>example-project</concludedValue>
+                    <methods>
+                        <method>
+                            <technique>filename</technique>
+                            <confidence>0.1</confidence>
+                            <value>example-project-1.0.0.jar</value>
+                        </method>
+                    </methods>
+                </identity>
+                <identity>
+                    <field>version</field>
+                    <confidence>0.1</confidence>
+                    <concludedValue>1.0.0</concludedValue>
+                    <methods>
+                        <method>
+                            <technique>filename</technique>
+                            <confidence>0.1</confidence>
+                            <value>example-project-1.0.0.jar</value>
+                        </method>
+                    </methods>
+                </identity>
+            </evidence>
         </component>
     </components>
     <dependencies>
diff --git a/src/test/resources/1.6/valid-evidence-1.6.json b/src/test/resources/1.6/valid-evidence-1.6.json
index 9bb4ebc3a..9881905b9 100644
--- a/src/test/resources/1.6/valid-evidence-1.6.json
+++ b/src/test/resources/1.6/valid-evidence-1.6.json
@@ -47,7 +47,8 @@
         "occurrences": [
           {
             "bom-ref": "d6bf237e-4e11-4713-9f62-56d18d5e2079",
-            "location": "/path/to/component"
+            "location": "/path/to/component",
+            "symbol": "test"
           },
           {
             "bom-ref": "b574d5d1-e3cf-4dcd-9ba5-f3507eb1b175",
diff --git a/src/test/resources/1.6/valid-evidence-1.6.xml b/src/test/resources/1.6/valid-evidence-1.6.xml
index 32d96983b..5d0cbf134 100644
--- a/src/test/resources/1.6/valid-evidence-1.6.xml
+++ b/src/test/resources/1.6/valid-evidence-1.6.xml
@@ -40,6 +40,7 @@
                 <occurrences>
                     <occurrence bom-ref="d6bf237e-4e11-4713-9f62-56d18d5e2079">
                         <location>/path/to/component</location>
+                        <symbol>test</symbol>
                     </occurrence>
                     <occurrence bom-ref="b574d5d1-e3cf-4dcd-9ba5-f3507eb1b175">
                         <location>/another/path/to/component</location>