Copy, paste, and ...?
Handle code duplication in a practical way
Clones make your codebase unnecessarily large and require you to apply changes multiple times. Not knowing where the clones may cause you to inadvertently introduce inconsistencies, which might turn out particularly expensive if the changes fix a defect.
In a study with Munich Re and LV1871 we found that 52% of all unintentional inconsistencies between clones are defects.
As a developer, you need access to detailed information about clones in the code you change. And you need immediate feedback, if you change clones inconsistently.
As an architect, you must be able to inspect cloning on a larger scale, to identify patterns and potentially rethink architecture decisions.
Teamscale not only comes with a best-of-class code-clone detection, it also shows you clones directly in your IDE or your merge request.
When you change a clone inconsistently, Teamscale immediately warns you about all remaining copies, so you can investigate whether those should be changed, too.
Teamscale identifies duplication across different components of your system, to help you find candidates for common infrastructure. You may freely specify what your components are, using Teamscale’s architecture modeling.
Teamscale may also identify clones across entire applications, to help you build and manage common infrastructure for your whole portfolio.
Start Clone Management Today
Setting up clone management is usually possible in a matter of a few hours.
In a study with Munich Re and LV 1871, we found that 52% of all unintentional differences between clones were defects. Clone management would’ve prevented all of them!
Thanks to clone management, Munich Re saves about 500 person days annually for fixing defects and has 6% lower effort overall, due to avoided duplication.
Everything you need to know about clone management. Can’t find the answer you’re looking for? Please chat to our friendly team.
A clone is a piece of code that exists as separate copies at least twice in your codebase.
* Because duplication means you have more code to maintain.
* Because, not knowing where all the copies are, you may involuntarily introduce costly inconsistencies, such as fixing a defect in one clone but not another.
While the textbook answer is ‘Yes’, we acknowledge that doing so might imply huge and risky changes. Therefore, we recommend Clone Management to control the risk and decide where it is appropriate to refactor – and where it isn’t.
Yes. Teamscale may find clones across components or entire applications.
Would you like to exchange experiences on Clone Management?
I have worked with Clone Management for over 15 years. In research papers, speaking at industry conferences, talking to developers and software architects, and working with customers who have been using it for years.
If you would like to learn more about clones and how clone management fits into your development process, I’m happy to chat.
Companies that use Teamscale
Teamscale supports and integrates many other tools and formats.
The latest news, events and insights from our team.