Structural Code Clone Detection Methodology Using Software Metrics

被引:10
作者
Aktas, Mehmet S. [1 ]
Kapdan, Mustafa [2 ]
机构
[1] Yildiz Tech Univ, Dept Comp Engn, Istanbul, Turkey
[2] Turkish Airlines, Inst Dev & Informat Technol Dept, Istanbul, Turkey
关键词
Code clone; simple code clone; structural code clone; software metrics; object oriented metrics;
D O I
10.1142/S0218194016500133
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Unnecessary repeated codes, also known as code clones, have not been well documented and are difficult to maintain. Code clones may become an important problem in the software development cycle, since any detected error must be fixed in all occurrences. This condition significantly increases software maintenance costs and requires effort/duration for understanding the code. This research introduces a novel methodology to minimize or prevent the code cloning problem in software projects. In particular, this manuscript is focused on the detection of structural code clones, which are defined as similarity in software structure such as design patterns. Our proposed methodology provides a solution to the class-level structural code clone detection problem. We introduce a novel software architecture that provides unification of different software quality analysis tools that take measurements for software metrics for structural code clone detection. We present an empirical evaluation of our approach and investigate its practical usefulness. We conduct a user study using human judges to detect structural code clones in three different open-source software projects. We apply our methodology to the same projects and compare results. The results show that our proposed solution is able to show high consistency compared with the results reached by the human judges. The outcome of this study also indicates that a uniform structural code clone detection system can be built on top of different software quality tools, where each tool takes measurements of different object-oriented software metrics.
引用
收藏
页码:307 / 332
页数:26
相关论文
共 40 条
[1]  
[Anonymous], 1998, P INT C SOFTW MAINT
[2]  
[Anonymous], WS0001 AAAI
[3]  
[Anonymous], 2007, 541 QUEENS U KINGST
[4]   Analyzing cloning evolution in the Linux kernel [J].
Antoniol, G ;
Villano, U ;
Merlo, E ;
Di Penta, M .
INFORMATION AND SOFTWARE TECHNOLOGY, 2002, 44 (13) :755-765
[5]  
Campbell G.A., 2014, SonarQube in action
[6]  
Fowler M., 1999, Refactoring: Improving the design of existing code
[7]   Micro patterns in Java']Java code [J].
Gil, J ;
Maman, I .
ACM SIGPLAN NOTICES, 2005, 40 (10) :97-116
[8]  
Grubb P, 2003, Software maintenance concepts and practice
[9]  
Jacobson I., 1992, Object-Oriented Software Engineering-A Use Case Driven Approach
[10]  
Johnson J.H., 1993, Proceedings of the 1993 conference of the Centre for Advanced Studies on Collaborative research: software engineering, V1