全部 标题 作者
关键词 摘要

OALib Journal期刊
ISSN: 2333-9721
费用:99美元

查看量下载量

相关文章

更多...
-  2017 

保持语义不变的C克隆代码预处理方法
Semantic-Preserving Pre-Processing Method for C Clone Code

DOI: 10.3969/j.issn.1001-0548.2017.06.023

Keywords: 自适应K-最近邻聚类,克隆代码,克隆不一致性缺陷检测,程序依赖图,重构

Full-Text   Cite this paper   Add to My Lib

Abstract:

克隆代码检测工具的输出结果由于存在克隆检测不一致性缺陷的误检和检测出的克隆代码不能直接用于重构的问题,需要对检测工具的输出结果进行预处理。为了解决该问题,提出一种新的克隆代码预处理方法。首先,将自适应K-最近邻聚类方法与程序依赖图相结合,用于降低克隆不一致性相关缺陷检测的误检。然后,使用基于代价-收益分析的评估方法,在消除缺陷后的克隆代码中识别可重构的克隆代码。实验结果表明,该预处理方法,不仅降低了克隆不一致性相关缺陷检测工具产生的误检,提高了可重构克隆代码的数量,而且将克隆代码检测与克隆代码重构两个过程连接为一个有机的整体,有利于提高软件的质量,降低软件维护的成本。

References

[1]  CAI D, KIM M. An empirical study of long-lived code clones[J]. Fundamental Approaches to Software Engineering Lecture Notes in Computer Science, 2011, 6603:432-446.
[2]  于冬琦, 彭鑫, 赵文耘. 使用抽象语法树和静态分析的重复代码自动重构方法[J]. 小型微型计算机2009, 30(9):1752-1760. YU Dong-qi, PENG Xin, ZHAO Wen-yun. Automatic refactoring method of cloned code using abstract syntax tree and static analyis[J]. Journal of Chinese Computer Systems, 2009, 30(9):1752-1760.
[3]  CODE N, KOS R. Frequency and risks of changes of clones[C]//33rd Internaitonal Conference on Software Engineering. Hawaii, USA:IEEE, 2011:311-320.
[4]  HIGO Y, KUSU S, INOUE K. Identifying refactoring opportunities for removing code clones with a metrics-based approach[M]. Hong Kong, China:CreateSpace Independent Publising Platform, 2011:1-26.
[5]  CHOU A, YANG J, CHELF B, et al. An empirical study of operating systems error[J]. SIGOPS Operating Systems Review, 2001, 35(1):73-88.
[6]  LI Z, LU S, 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.
[7]  王倩. 基于序列挖掘的C克隆代码及相关软件缺陷的检测[D]. 哈尔滨:哈尔滨工业大学, 2009. WANG Qian. Detection of clones and related software defects of C programs via sequential pattern mining[D]. Harbin:Harbin Institute of Technology, 2009.
[8]  MA Pei-jun, BIAN Yi-xin. A clustering method for pruning false positive of clone code detection[C]//International Conference on Mechatronic Sciences, Electric Engineering and Computer (MEC 2013). Shenyang, China:IEEE, 2013:1917-1920.
[9]  KAPSER C, GODFREY M W. "Cloning considered harmful" considered harmful[C]//The 13th Working Conference on Reverse Engineering. Washington DC:USA:IEEE, 2006:19-28.
[10]  YANG L, LIU HUI, NIU Z. Identifying fragments to be extracted from long methods[C]//Asia-Pacific Software Engineering Conference. Washington DC, USA, IEEE, 2009:43-49.
[11]  BIAN Yi-xin, SU Xiao-hong, MA Pei-jun. Identifying accurate refactoring opportunities using metrics[C]//International Conference on Soft Computing Techniques and Techniques and Engineering Application. Shenyang, China:IEEE, 2013:141-146.
[12]  ALKHALID A, ALSHAYEB M, MAHMOUD S. Software refactoring at the function level using new adaptive K-nearest neighbor algorithm[J]. Advances in Engineering Software, 2010, 41(10-11):1160-1178.
[13]  FERRANTE J, OTTENSTEIN K J, WARREN J D. The program dependence graph and its use in optimization[J]. ACM Transaction on Program Language System, 1987, 9(3):319-349.
[14]  苏小红, 马培军, 王倩, 等. C克隆代码缺陷检测工具:中国,[CPBugdetector] V1.0[CP/DK]. 2010. SU Xiao-hong, MA Pei-jun, WANG Qian, et al. A defects detection tool for C clones, China,[CPBugdetector] V1.0[CP/DK]. 2010.
[15]  KIM M, BERG L, LAU T, et al. An ethnographic study of copy and paste programming practices in oopl[C]//International Symposium on Empirical Software Engineering. Washington DC, USA:IEEE, 2004:83-92.

Full-Text

Contact Us

service@oalib.com

QQ:3279437679

WhatsApp +8615387084133