O'Reilly logo

Sonar Code Quality Testing Essentials by Charalampos Arapidis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Locating duplicated code with Sonar

All duplication metrics are accessible from the project dashboard beside the Comments section. Notice how the metric in the large font is highlighted to alert us that the duplication levels are above five percent. All metrics are hyperlinks allowing us to drill down and locate the source.

Locating duplicated code with Sonar

Click any of the first two metrics (percentage and number of physical lines) to navigate to the drill down screen. From left to right, you can see three panels (Project, Package, and Class) with the leftmost one listing all classes that contain duplicated code. The number next to a class name is the number of physical lines duplicated. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required