Two results of Line Of Code indicator, which one is good?

I am using SonarQube 8.9
I want to know the amount of line of code scanned by Sonar in order to know if I respect the limit of our licence agreement.
When I navigate through the UI : Administration > System > Line of Code I have a number which is different from the API.
Maybe it is because we have activated the option “multi-branch analysis” which means it is counted twice for the same code ?
Thanks for your help.


The LOC count for License purposes counts the LOC in the largest branch of each project (in 9.2 that expands to include PRs as well). It’s not unusual for the sum of counts you see on the Projects page to not match what you see in the License page.

As for the System page, I’ve checked our dogfooding instance and the LOC counts match between the System page and the License page, and I’m not finding any tickets in Jira which indicate that something has been fixed in this area. (Altho my Jira-fu could be failing me. It often does…)

Could you provide more details? How large is the discrepancy?

Also, you may be interested to know that in 9.4 Enterprise Edition($$) we added a License LOC report to help you understand exactly where (which branch of each project) your LOC total is coming from.