“Cloning considered harmful” considered harmful: patterns of cloning in software

被引:0
|
作者
Cory J. Kapser
Michael W. Godfrey
机构
[1] University of Waterloo,Software Architecture Group (SWAG) David R. Cheriton School of Computer Science
来源
关键词
Clone detection; Clone analysis; Reverse engineering; Case study;
D O I
暂无
中图分类号
学科分类号
摘要
Literature on the topic of code cloning often asserts that duplicating code within a software system is a bad practice, that it causes harm to the system’s design and should be avoided. However, in our studies, we have found significant evidence that cloning is often used in a variety of ways as a principled engineering tool. For example, one way to evaluate possible new features for a system is to clone the affected subsystems and introduce the new features there, in a kind of sandbox testbed. As features mature and become stable within the experimental subsystems, they can be migrated incrementally into the stable code base; in this way, the risk of introducing instabilities in the stable version is minimized. This paper describes several patterns of cloning that we have observed in our case studies and discusses the advantages and disadvantages associated with using them. We also examine through a case study the frequencies of these clones in two medium-sized open source software systems, the Apache web server and the Gnumeric spreadsheet application. In this study, we found that as many as 71% of the clones could be considered to have a positive impact on the maintainability of the software system.
引用
收藏
相关论文
共 50 条