SonarCloud’s calculation of duplication is fairly… set in its ways (a kind way of saying old). I wouldn’t expect that something has changed there. Just to get a little more information – what are the primary languages being used in your project?
It’s more likely that something is happening with your New Code Period.
If you have a sliding New Code Period (which here you have, of 28 days), the definition of what lines fall under “New Code” will change as some code “ages out” of that window. This may be a little more clear if you check the Activity section of your project.
Say, for example, you had very low code duplication on some code that fell in the New Code Period, as that code ages out it will no longer balance newer code with greater duplication.
I would suggest that you:
- Make sure your New Code Period is defined in a way that matches your expectations. A rolling window doesn’t work for everyone.
- Check the 8.2k New Lines that the dashboard says are being considered for duplication (as best you can) and make sure that no lines have fallen into the New Code Period that shouldn’t have. A good place to start would be to make sure the files that have changed look as expected, and there’s no large number of New Lines reported on files that aren’t new.
- Check the duplication being reported. Is it valid, and only being reported on lines introduced in the last 28 days?