# 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.

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

* [Pivotal Cloud Foundry (PCF) Support](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/pivotal-cloud-foundry-pcf-support.md)(Java)
* [NodeJS - JavaScript heap out of memory](/knowledgebase/setup-and-configuration/troubleshooting-faq/node-javascript/nodejs-javascript-heap-out-of-memory.md) (NodeJS)
* [Testing Frameworks Integration](/knowledgebase/setup-and-configuration/integrations/testing-frameworks-integration.md)
* [Installing the Coverage Listener as a JVM Java Agent](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/default-usage-cli/installing-the-coverage-listener-as-a-jvm-java-agent.md) (Java)
* [CD Agent for Java Application](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/cd-agent/cd-agent-for-java-application.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/troubleshooting-faq/java/incorrect-quality-risk-detection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
