Hi,
I just ran SonarQube on a couple of TypeScript and C# projects to see how well the CPD (code duplication detection) could give me the information about where and how duplicate code was produced in those projects.
What I was very surprised about is how SonarQube decides to assign issues that are created by the common-ts:DuplicatedBlocks and common-cs:DuplicatedBlocks to authors.
Those issues seem to be simply assigned by the SCM log's latest commit author (which might not be in any way related to the issue).
This means that if I'm the unlucky guy who just updated a single-line doc comment in a file that contains a 80% code duplication issue which is totally unrelated to my change, I have just become "proud" author of this 80% duplication issue and the technical debt that comes with it.
What I would have normally expected is that SonarQube should check many lines in the duplicated code where introduced by which person (based on SCM blame information) and then make the person that introduced the most lines of the duplicated block the rightful author of the duplication issue.
Is this a bug ? or is using SCM blame information too correctly identify the author simply to expensive during analysis ?
I'd really like to improve this feature to be able to more easily manage code duplication, so please let me know what you think about this behavior and what we should do to improve the meaningfulness of duplication issues' authors.
Thanks