Clone Detection/Removal Benefits Calculations

What's Wrong With Cloning Code?

Programmers frequently create code by copying and adjusting existing functions into new code paths. This is a fast way to write code, but it has downstream drawbacks. First off, any errors in the original code are unknowingly cloned. Problems multiply during maintenance, since all changes of the functionality now must be done in two (or more) places, assuming anybody remembers the problem is in multiple places. This results in redundant maintenance effort, or worse, defects because code that requires change was overlooked. Furthermore, analysis is made difficult because the system structure is obscured: modules look large and different and code commonality is not readily apparent.

What's the Solution To Too Much Duplication?

Use Semantic Designs’ CloneDR to detect duplicate and near-duplicate code. The tool can show how replace such sections with parameterized calls to utility subroutines/methods that it creates. This will reduce the source code size and improves system structure. Additional improvements to quality can be made by manually reviewing the near duplicate sections for defects.

How Much Can You Save If It's Gone?

1) Estimate the amount of code in your system:
Enter Source Lines of Code (SLOC) including comments: 

2) Indicate how much code each of your programmers is responsible for maintaining:
Input the number of programmers actively maintaining (fixing bugs) in your system: 

3) Provide the cost of ongoing engineering:
Input the average burdened salary of your programmers: 
(note: unburdened average for IT programmers is $83,000yr**)

* Basis of Estimate: Baker, B. S. quotes 13%-20%, from paper “On Finding Duplication and Near-Duplication in Large Software Systems.” 2nd working conference on reverse engineering 1995.
** Source: InfoWorld 2004 Compensation Survey,

For more information: [email protected]    Follow us at Twitter: @SemanticDesigns

Clone Removal
Calculator