When a developer adds (comparably) a big number of duplicated lines of code that could be a risk indicator for copy-pasting code instead of programming. Code that is copy-pasted requires a manual update when a variable within is changed. That could lead to increase in maintainability costs and a possibility of creating bugs after changes occur.
On the top chart, we see 2 points in time when copy-paste occurred. The 1st occurrence massively increased a number of duplicates on the project. This led to the sizeable increase in Tech Debt highlighting that code with the vast amount of issues was duplicated (bottom chart).
- Found out a reason, why duplicates sharply increased 2 times.
- Stress on the 1st event that led to increase in the amount of technical debt.
- Estimate a possibility of code refactoring based on a potential harm that duplicated code could cause.
- Recognition of a potential malpractice (or a conscious move to cut time) that could lead to an increase in maintenance costs and decrease code readability.
- Show developer that the manager has effective tools for the control.