2010 · 10 citations · 11 references
ComputingComputer ScienceKnowledge ReuseSoftware EngineeringSystems ProgrammingSoftware EvolutionSoftware MaintenanceSoftware ReuseClone DetectionCode Clone DetectionCode ComprehensionCode ReuseSoftware Development Life CycleSoftware Development LifecycleSoftware Maintenance ProcessSource Code Cloning
Excessive code duplication is a bane of modern software development. Several experimental studies show that on average 15 percent of a software system can contain source code clones - repeatedly reused fragments of similar code. While code duplication may increase the speed of initial software development, it undoubtedly leads to problems during software maintenance and support. That is why many developers agree that software clones should be detected and dealt with at every stage of software development life cycle. This paper is a brief survey of current state-of-the-art in clone detection. First, we highlight main sources of code cloning such as copy-and-paste programming, mental code patterns and performance optimizations. We discuss reasons behind the use of these techniques from the developer's point of view and possible alternatives to them. Second, we outline major negative effects that clones have on software development. The most serious drawback duplicated code have on software maintenance is increasing the cost of modifications - any modification that changes cloned code must be propagated to every clone instance in the program. Software clones may also create new software bugs when a programmer makes some mistakes during code copying and modification. Increase of source code size due to duplication leads to additional difficulty of code comprehension. Third, we review existing clone detection techniques. Classification based on used source code representation model is given in this work. We also describe and analyze some concrete examples of clone detection techniques highlighting main distinctive features and problems that are present in practical clone detection. Finally, we point out some open problems in the area of clone detection. Currently questions like "What is a code clone?", "Can we predict the impact clones have on software quality" and "How can we increase both clone detection precision and recall at the same time? " stay open to further research. We list the most important questions in modern clone detection and explain why they continue to remain unanswered despite all the progress in clone detection research.
11
Clone detection using abstract syntax trees
Ira D. Baxter, A. Yahin, Leonardo de Moura et al. · 2002 · 1.3K citations
An empirical study of operating systems errors
Andy Chou, Junfeng Yang, Benjamin Chelf et al. · 2001 · 718 citations
Identifying similar code with program dependence graphs
Jens Krinke · 2002 · 622 citations
CP-Miner: a tool for finding copy-paste and related bugs in operating system code
Zhenmin Li, Shan Lu, Suvda Myagmar et al. · 2004 · 335 citations