1. Software Engineering
  2. Code Quality

Code Duplication


Quantifies the amount of duplicated code in a codebase. High duplication can lead to larger codebases, making maintenance more challenging and increasing the potential for errors.


(Duplicated Lines of Code / Total Lines of Code) * 100


If a project has 1,000 lines of code with 100 lines duplicated, the code duplication rate is (100/1000)*100 = 10%.