期刊文献+

基于后缀数组的克隆检测 被引量:7

Clone Detection Based on Suffix Array
下载PDF
导出
摘要 程序员对源代码的拷贝、粘贴及修改活动会导致软件中出现大量克隆代码,增加软件开发和维护的成本。为解决该问题,提出一种新的克隆检测方法。利用基于后缀数组的算法查找重复的Token子串,进而检测出克隆代码,开发相应的克隆检测工具SaCD,用其检测29款C语言开源软件。实验结果表明,SaCD能快速有效地检测软件中的Type-1和Type-2语句克隆,其检测速度比传统的克隆检测工具CCFinderx快了近20倍。 The activities of the programmers for copying, pasting and modifying result in a lot of code clones in the software systems, and increase the cost of software development and maintenance. Aiming at this problem, this paper presents a new clone detection method which uses algorithm based on suffix array to efficiently search repeated token substrings and to detect code clones at last. It develops a clone detection tool SaCD and detects twenty-nine open source software systems of C language. Experimental results show that the SaCD can fastly and efficiently detect Type-1 and Type-2 statement clones in the software. The detection speed of SaCD is twenty times than that of CCFinderx.
出处 《计算机工程》 CAS CSCD 2013年第9期123-127,共5页 Computer Engineering
基金 内蒙古自然科学基金资助项目(2011MS0906)
关键词 克隆代码 克隆检测 Token串 后缀数组 重复子串 DC3算法 clone code clone detection Token string suffix array repeated substring DC3 algorithm
  • 相关文献

参考文献19

  • 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.
  • 8郭婧,吴军华.基于程序依赖图的克隆检测及改进[J].计算机工程与设计,2012,33(2):595-600. 被引量:6
  • 9Mayrand 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.
  • 10Davis 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.

二级参考文献9

  • 1曹羽中,金茂忠,刘超.克隆代码检测技术综述[J].计算机工程与科学,2006,28(z2):9-13. 被引量:6
  • 2JDK1.5 [ CP/OL ]. http://java, sun. com/javase/downloads/ index, j sp, 2008 -03 - 01.
  • 3Toshihiro Kamiya, Shinji Kusumoto, Katsuro Inoue. CCFinder: a multilinguistic token-based code clone detection system for large scale source code[J].IEEE Transactions on Software Engineering, 2002,28 (7) : 654 - 670.
  • 4Ira D Baxter, Andrew Yahin, Leonardo Moura, et al. Clone detection using abstract syntax trees [ A ]. In: Proceedings of the International Conference on Software Maintenance[ C ]. Maryland, USA: IEEE CS, 1998.368 - 377.
  • 5Raghavan Komondoor, Susan Horwitz. Using slicing to identify duplication in source code[ A]. In: Proceedings of the 8th International Symposium on Static Analysis (LNCS 2126)[C]. Germany: Springer, 2001.40 - 56.
  • 6Jens Krinke. Identifying similar code with program dependence graphs[ A ]. In:Proceedings of the 8th Working Conference on Reverse Engineering [ C ]. Germany: ACM Press, 2001. 301 - 309.
  • 7Chao Liu, Chen Chen, Jiawei Han, Philip S Yu. GPLAG: Detection of software plagiarism by program dependence graph analysis[ A] .In:Proceedings of the 12th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining [ C ]. Philadelphia, USA: ACM Press. 2006. 872 - 881.
  • 8叶青青.软件系统中代码克隆的检测技术[J].计算机系统应用,2007,16(12):94-97. 被引量:7
  • 9于冬琦,彭鑫,赵文耘.使用抽象语法树和静态分析的克隆代码自动重构方法[J].小型微型计算机系统,2009,30(9):1752-1760. 被引量:14

共引文献6

同被引文献62

  • 1黄建明.贝叶斯网络在学生成绩预测中的应用[J].计算机科学,2012,39(S3):280-282. 被引量:30
  • 2叶进,林士敏.基于贝叶斯网络的推理在移动客户流失分析中的应用[J].计算机应用,2005,25(3):673-675. 被引量:12
  • 3ZIBRAN M F, SAHA R K, ASADUZZAMAN M, et al. Analyzing and forecasting near-miss clones in evolving software: an empirical study[ C] // Proceedings of the 16th IEEE International Conference on Engineering of Complex Computer Systems. Piscataway: IEEE Press, 2011:295-304.
  • 4HARDER J, GODE N. Cloned code : stable cede [ J ] . Journal of Software: Evolution and Preeess, 2013, 25(10) : 1063 - 1088.
  • 5CHATrERJI D , CARVER J C , KRAFT N A , et al. Effects of cloned code on software maintainability: a replicated developer study [ C]// Proceedings of the 20th IEEE Working Conference on Re- verse Engineering. Piscataway: IEEE Press, 2013:112-121.
  • 6GODE N, KOSCHKE R. Frequency and risks of changes to clones [ C]// Proceedings of the 33rd IEEE International Conference on Software Engineering. Piscataway: IEEE Press, 2011:311-320.
  • 7NGUYEN H A, NGUYEN T T, PHAM N H, et al. Clone manage- ment for evolving software[ J]. IEEE Transactions on Software Engi- neering, 2012, 38(5) : 1008 - 1026.
  • 8ZHANG G, PENG X, XING Z, et al. Towards contextual and on- demand code clone management by continuous monitoring [ C]// Proceedings of the 28th IEEE/ACM International Conference on Au- tomated Software Engineering. Piscataway: IEEE Press, 2013:497 -507.
  • 9ROY C K, ZIBRAN M F, KOSCHKE R. The vision of software clone management: past, present, and future (Keynote paper) [ C] // Proceedings of the 2014 IEEE Conference on Software Main- tenance, Reengineeriug and Reverse Engineering. Piscataway: IEEE Press, 2014:18 -33.
  • 10PATE J R, TAIRAS R, KRAFT N A. Clone evolution: a systematic review[J]. Journal of Software: Evolution and Process, 2013, 25 (3): 261-283.

引证文献7

二级引证文献39

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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