Duplicate code is marked in the old files

Hello,

We have an issue in that many old files/lines of code were marked as duplicates, but there has been no change in those files.
Currently, we use the sonar scanner CLI version 4.7.0.2747 and SCM is Git

Hey there.

There’s nothing inherently wrong in what you’ve stated (when analyzing a long-lived branch of your project, duplication will be calculated on the overall code).

Is there another nuance I’m missing? Is the duplication being raised on New Code, for example?

Sharing screenshots would be a great way to share what you’re seeing, and why it’s unexpected.

Sorry for the confusing statement.
When analyzing a short-lived branch, the duplication is raised on the Old Code. @Colin
I also tried to create a new project and scanned the master branch first. Then I scanned the feature branch but it still caught the old code as duplication on the feature branch.

Here are the total changing files in the PR.

And here are the total new lines of code in SonarCloud.

Hi @Colin ,

Have you had any idea about this issue?