Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Duplicated Lines (%) shows a percentage of duplicated lines in the project code compared to a total amount of lines of code (LOC) on the project.

How metric helps

Code duplicates will lead to duplicated bugs and coding standards breaches, etc. Therefore increasing duplicated lines percentage can indicate a lack of good inheritance structure or abstractionThe worst consequence of a big number of duplicates is a case when a software vulnerability is copied, the vulnerability may continue to exist in the copied code if the developer is not aware of such copies. Refactoring of duplicated code can improve many software metrics, such as lines of code, complexity. This may lead to shorter compilation times, lower cognitive load, less human error, and fewer forgotten or overlooked pieces of code.

How it works

Chart Overview

...

Each project child unit (can be set up in Project Configuration Wizard) in the legend is clickable, and shows/hides its percentage on the chart once clicked. The chart also adjusts a scale automatically to better fit the series shown on a screen.

2017-10-23_16-30-33.png

Calculation Formula

Duplicated Lines (%) = Duplicated Lines / LOC * 100%,

...