# Incorrect Quality Risk Detection

## Case 1: The QR displayed on the dashboard refers to an incorrect line number within the code <a href="#case-1-the-qr-displayed-on-the-dashboard-refers-to-an-incorrect-line-number-within-the-code" id="case-1-the-qr-displayed-on-the-dashboard-refers-to-an-incorrect-line-number-within-the-code"></a>

Generally speaking, in the Sealights dashboard - the method **signature** will always be denoted along with the line in which it is declared.

With that being said, this location is detected according to where the **method body** (the actual code) begins.

In those cases where the method **body** begins a few lines beneath the **signature**, the Quality Risk line number detected within the dashboard QR view will not match the actual location of the method in the code viewer.

## Case 2: The QR displayed on the dashboard appears on a method that wasn’t changed <a href="#case-2-the-qr-displayed-on-the-dashboard-appears-on-a-method-that-wasnt-changed" id="case-2-the-qr-displayed-on-the-dashboard-appears-on-a-method-that-wasnt-changed"></a>

In this case, it could also be that the method on which a QR was detected, invokes another class which was changed.

### In order to verify the changes, follow these steps: <a href="#in-order-to-verify-the-changes-follow-these-steps" id="in-order-to-verify-the-changes-follow-these-steps"></a>

#### Requirements: <a href="#requirements" id="requirements"></a>

1. A machine with **JDK** (not JRE)
2. Both versions of the class files in which the risk was detected (before detection/after detection)
   1. For the sake of this example, we’ll refer to the class file in question as Foo.java.

#### Steps: <a href="#steps" id="steps"></a>

1. On the **earlier** version of Foo.java , run the following command:\
   `javap -p -v Foo.class > before.txt`
2. On the **later** version of Foo.java , run the following command:\
   `javap -p -v Foo.class > after.txt`
3. Compare the files to understand the changes in the bytecode.
   * Since Sealights operates within the Java bytecode, this will be the indicator as to what actually changed with the class files in question.
4. In case any further information is needed, or additional assistance is required with understanding the results - contact Sealights support.

&#x20;

### Related articles <a href="#related-articles" id="related-articles"></a>

* [pivotal-cloud-foundry-pcf-support](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/pivotal-cloud-foundry-pcf-support "mention")(Java)
* [nodejs-javascript-heap-out-of-memory](https://docs.sealights.io/knowledgebase/setup-and-configuration/troubleshooting-faq/node-javascript/nodejs-javascript-heap-out-of-memory "mention") (NodeJS)
* [testing-frameworks-integration](https://docs.sealights.io/knowledgebase/setup-and-configuration/integrations/testing-frameworks-integration "mention")
* [installing-the-coverage-listener-as-a-jvm-java-agent](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/default-usage-cli/installing-the-coverage-listener-as-a-jvm-java-agent "mention") (Java)
* [cd-agent-for-java-application](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/cd-agent/cd-agent-for-java-application "mention")
