Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Purpose

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

The 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 metric works

Chart Overview

Duplicate code lines values are shown in % (Axis Y) and distributed over time (Axis X) on the chart.

Calculation 

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

where

Duplicated Lines - a number of duplicates

LOC - number of all code lines

RAG thresholds: Green <= 2%, Amber <=10%, Red >10%.

Data Source

Data for the metric can be collected from Sonar.

Copyright © 2024 EPAM Systems, Inc.

All Rights Reserved. All information contained herein is, and remains the property of EPAM Systems, Inc. and/or its suppliers and is protected by international intellectual property law. Dissemination of this information or reproduction of this material is strictly forbidden, unless prior written permission is obtained from EPAM Systems, Inc.


  • No labels