Fail positive report of duplication of code for call function

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
In the last run of sonar cloud I got the report about code duplication.

I do not understand why separate arguments of the function are counted as separate lines in duplication. As you can see on screenshot, the threshold argument is not counted as duplication, so there is no real duplication of code.

Hi Grzegorz,

If you click on the dark grey block on the left you can have more information about duplication. Where the duplications are located. Also if you click on one of the bars you will get information in the “Duplicated By” about the lines that are duplicated.

To answer the question the threshold is in the duplicated block. If you mean highlighting the beginning of the argument is highlighted. Please let me know if you have further questions.

Hi Grzegorz,

After looking at the PR I need to modify my first response to the threshold content is not calculated in the new blocks of duplication because 64-69 has only whitespace changes compared to the previous version. We ignore whitespace during analysis so the 17 lines are only “not just whitespace changed lines” which are duplicated. If you navigate back to your main branch then the “threshold” object is indeed counted in the duplicated lines.
Hope that explains. Please let me know if you have more questions.