期刊文献+

基于决策树推荐克隆重构的方法 被引量:3

Recommending clone refactoring method based on decision tree
下载PDF
导出
摘要 针对克隆代码的大量使用会导致长期软件维护问题甚至引入错误,提出了一种基于决策树的分类器来推荐克隆进行重构。首先,使用Ni Cad进行克隆检测;其次,收集了与克隆关系、克隆代码段和克隆上下文都相关的特征;然后,利用决策树分类器训练;最后,利用K折交叉评估分类结果。在5款开源软件中对近600多个克隆实例进行实验,实验结果表明所提方法为每个目标系统推荐克隆重构实例时达到80%的精度。 Aiming at long-term software maintenance even introduction of errors due to extensive use of cloned code, a classifier based on decision tree was proposed to recommend clone for refactoring. Firstly, clone detection was performed using NiCad. Secondly, the features related to cloning relationship, cloned code segment and clonal context were collected. Thirdly, a decision tree classifier was used for training. Finally, the classification results were evaluated by K-fold crossover. The experiments were conducted on nearly 600 clones in five kinds of open-source software. The experimental results show that the proposed method achieves 80% accuracy when recommending clonal refactoring instances for each target system.
作者 折蓉蓉 张丽萍 侯敏 闫盛 SHE Rongrong;ZHANG Liping;HOU Min;YAN Sheng(College of Computer and Information Engineering,Inner Mongolia Normal University,Hohhot Nei Mongol 010022,China)
出处 《计算机应用》 CSCD 北大核心 2018年第7期2037-2043,2069,共8页 journal of Computer Applications
基金 国家自然科学基金资助项目(61462071) 内蒙古自然科学基金资助项目(2016MS0612)~~
关键词 克隆代码 克隆重构 克隆检测 决策树 特征选择 code clone clone refactoring clone detection decision tree feature selection
  • 相关文献

参考文献5

二级参考文献46

  • 1Kamiya T, Kusumoto S, Inoue K. CCFinder: A Multi-linguistic Token-based Code Clone Detection System for Large Scale Source Code[J]. IEEE Transactions on Software Engineering, 2002, 28(7): 654-670.
  • 2Deissenboeck F, Hummel B, Juergens E. Code Clone De- tection in Practice[C]//Proc. of the 32nd ACM/IEEE Inter- national Conference on Software Engineering. Cape Town, South Africa: ACM Press, 2010.
  • 3Roy C K, Cordy J R, Koschke R. Comparison and Evaluation of Code Clone Detection Techniques and Tools: A Qualitative Approach[J]. Science of Computer Programming, 2009, 74(7): 470-495.
  • 4Johnson J H. Identifying Redundancy in Source Code Using Fingerprints[C]//Proc. of Centre for Advanced Studies on Collaborative Research: Software Engineering. [S. 1.]: IBM Press, 1993.
  • 5Baker B S. On Finding Duplication and Near-duplication in Large Software Systems[C]//Proc. of the 2nd Working Conference on Reverse Engineering. Toronto, Canada: IEEE Press, 1995.
  • 6Li Zhenmin, Lu Shan, Myagmar S, et al. CP-Miner: Finding Copy-paste and Related Bugs in Large Scale Software Code[J] IEEE Transactions on Software Engineering, 2006, 32(3): 176-192.
  • 7Baxter I, Andrew Y, Moura L, et al. Clone Detection Using Abstract Syntax Trees[C]//Proc. of International Conference on Software Maintenance. Bethesda, USA: IEEE Press, 1998.
  • 8Mayrand J, Leblanc C, Merlo E. Experiment on the Automatic Detection of Function Clones in a Software System Using Metrics[C]//Proc. of International Conference on Software Maintenance. Monterey, USA: IEEE Press, 1996.
  • 9Davis I, Godfrey M. From Whence It Came: Detecting Source Code Clones by Analyzing Assembler[C]//Proc. of the 17th Working Conference on Reverse Engineering. Beverly, USA: IEEE Press, 2010.
  • 10Keivanloo I, Roy C K, Rilling J. Java Bytecode Clone Detection via Relaxation on Code Fingerprint and Semantic Web Reasoning[C]//Proc. of the 6th International Workshop on Sot:ware Clones. Zurich, Switzerland: [s. n.], 2012.

共引文献18

同被引文献28

引证文献3

二级引证文献6

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部