How the LOC are getting calculated?

We have a Project A with the following activities:
Scan #1: Activity log shows some 580 LOC
Scan #2: Activity log shows 23k LOC
Scan #3: Again 580 LOC
Scan #4: Again 23k LOC
Scan #5: 580 LOC
Now what will be calculated against the license? Will it be 23k or 500 or 23.5k?
But on the project information it is only showing 580 which is the latest scan. We are kind of confused here and what is the exact number of LOC calculated? How can we make sure that it is correct?
Also, we observed that our overall license consumption is getting lowered sometimes, for ex on one day it is showing 1.2M and the other day it is like 1M. Please advise.


The docs have a pretty thorough rundown.

If you’re talking about a project with only one branch, then the LoC counted for that project will be the LoC from the most recent analysis. If there are multiple branches/PRs, it’s the LoC of the most recent analysis of the biggest branch (a PR is unlikely to be the biggest although they are checked).