I found that the empty lines are considered as duplicated lines in my codebase.
We have set the duplicated lines QG threshold to 3%, as SonarQube is also checking the empty lines, and considering it as duplicated lines my QG is failing.
I agree that sonar should ignore whitespace, but is it possible that these lines have a mix of spaces and tabs, or mixed carriage returns that would flag them differently?
I don’t remember seeing this issue in our codebase so that’s why I’m suspecting your lines might be a bit special.