Coverage metric definition details questions

Hi - we are looking for clarification on how the “coverage” metric is calculated. We’ve read the very helpful documentation at Code metrics | SonarQube Server Documentation (thank you for this!) and wanted some clarification.

coverage = (CT + LC)/(B + EL)
conditionCoverage = (CT + CF) / (2*B)

Three questions:

  1. We’ve tried to find CT (conditions that have been evaluated to ‘true’ at least once) in the UI and via the API for one of our projects and cannot find it. Does it appear in the UI or via the API anyplace?

  2. We’ve tried to find CF (conditions that have been evaluated to ‘false’ at least once) in the UI and via the API for one of our projects and cannot find it. Does it appear in the UI or via the API anyplace?

  3. Are java exceptions considered another branch? Do they factor into the calculations of either branch coverage or coverage?

Thank you very much! SonarQube is a great product!
I personally very much appreciate the high quality documentation and thank you for that in particular.

Must-share information:
Version: SQ version Community Edition v10.6 (92116)
Deployment: Docker
Achieve: We would like to understand the coverage metrics better
What have we tried: We’ve tried using the UI as well as use the restful endpoints to gather more information on our projects.

CT + CF is equivalent to conditions_to_cover (Conditions to Cover in the UI).

CF is equivalent to uncovered_conditions (Uncovered conditions in the UI)

So CT can be manually calculated as the difference between conditions_to_cover and uncovered_conditions, but it’s not displayed in the UI or available via API.

That’s up to JaCoCo. SonarQube reads the coverage report and interprets it as is.

Thank you very much for a quick, clear, and complete answer!