Clone Management
Avoid Software Erosion by Detecting and Managing Duplicated Code
How much duplicated code does your project contain?
The clone detection and clone management feature of Axivion Static Code Analysis detects both: Duplicates and similar pieces of code in the source code and tracks them over time to support consistent further development. It does this by using the structure and can therefore also detect clones with altered function names and variable names.
This screenshot represents a listing of cloned code.
Why is it important to detect duplicated code?
Duplicated code (aka. clones) increases maintenance costs and error rate. At the same time, there is unlikely to be a big software project that doesn’t have a clone. Axivion helps you detect them and make the necessary changes in all clones.
Managing Different Types of Clones
Axivion Static Code Analysis can identify three types of clones:
- Type 1 (identical)
- Type 2 (structurally identical)
- Type 3 (with structural differences)
This gives you control over duplicated code, which you can either tolerate, swap as part of refactoring – into a function, for example – or raise in the class hierarchy.