Conclusions

We started out asking a simple question: is code cloning really such a bad idea as some people claim? Our previous experience in studying code cloning in large open source software systems led us to believe that it wasn’t always a bad idea, and that indeed sometimes it was the right and proper thing to do! Inspired by some thought experiments and supported by empirical studies, we’re now pretty sure that we’re right. Of course, as any interesting study is wont to do, this work opens up a lot more questions than it answers: What other cloning patterns are there? What is the relative risk of one kind of cloning over another? How does the application domain affect the risks of cloning? What happens when clones migrate across application boundaries? And what kind of tool or language support might help to ease the maintenance and mitigate the risk of cloning? Well, these are certainly good questions, but we’ll be happy to address them another day.

Get Making Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.