[1]张重峰,李必信,孙小兵,等.基于切片度量的重构对象识别[J].东南大学学报(自然科学版),2010,40(2):275-281.[doi:10.3969/j.issn.1001-0505.2010.02.011]
 Zhang Chongfeng,Li Bixin,Sun Xiaobing,et al.Slice-based metrics for identifying refactoring[J].Journal of Southeast University (Natural Science Edition),2010,40(2):275-281.[doi:10.3969/j.issn.1001-0505.2010.02.011]
点击复制

基于切片度量的重构对象识别()
分享到:

《东南大学学报(自然科学版)》[ISSN:1001-0505/CN:32-1178/N]

卷:
40
期数:
2010年第2期
页码:
275-281
栏目:
计算机科学与工程
出版日期:
2010-03-20

文章信息/Info

Title:
Slice-based metrics for identifying refactoring
作者:
张重峰 李必信 孙小兵 陶传奇
东南大学计算机科学与工程学院, 南京 211189
Author(s):
Zhang Chongfeng Li Bixin Sun Xiaobing Tao Chuanqi
School of Computer Science and Engineering, Southeast University, Nanjing 211189, China
关键词:
程序切片 距离函数 控制度函数 度量 重构识别
Keywords:
program slicing distance function control function metrics refactoring identification
分类号:
TP311
DOI:
10.3969/j.issn.1001-0505.2010.02.011
摘要:
为了提高识别重构对象的效率和正确性,提出一种自动化识别重构对象的技术.首先,在程序切片的基础上,构造一种度量函数来量化元素间的依赖程度.然后,利用度量结果识别出在原程序的位置和从属关系不合理的元素,从而自动识别出程序中的“坏味道”.与以往的手动识别相比,该方法可以自动地分析源代码,指出程序中不合理的地方,从而提高重构识别的效率,并建议使用相应的重构手段对“坏味道”实施更改,使代码更加合理、易于维护.最后,利用3个重构实例显示该方法能够识别出一些重构对象,从而验证了该方法的可行性.
Abstract:
In order to improve the efficiency and accuracy of identifying refactoring, an automated refactoring identification technology is presented. First, a measurement method based on program slicing is constructed to quantify the program dependence between the elements. Secondly, the elements with unreasonable location and affiliation in the original code are identified using measurement results, and thus program’s “bad smell” is automatically identified. Compared with previous manual identification, the method can automatically analyze the source code and point out the unreasonable code, so the efficiency of refactoring identification is improved. It is recommended to change “bad smell” using the corresponding refactoring, which may make the code more reasonable and easier to maintain. Finally, three refactoring examples demonstrate that the method can identify some objects of refactoring, which verify the feasibility of the method.

参考文献/References:

[1] Fowler M.Refactoring:improving the design of existing programs [M].New York:Addison Wesley,1999.
[2] Kamiya T,Kusumoto S,Inoue K.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.
[3] Kataoka Y,Ernst M D,Griswold W G,et al.Automated support for program refactoring using invariants [C] //Proceedings of the 2001 International Conference on Software Maintenance.Florence,Italy,2001:736-743.
[4] Simon F,Steinbruckner F,Lewerent C.Metrics based refactoring [C] //Proceedings of the 5th European Conference on Software Maintenance and Reengineering.Lisbon,Portugal,2001:30-38.
[5] Bohnet J,Döllner J.Analyzing feature implementation by visual exploration of architecturally-embedded call-graphs [C] //Proceedings of the 2006 International Workshop on Dynamic Systems Analysis.Shanghai,China,2006:41-48.
[6] Chidamber S R,Kemerer C K.A metrics suite for object oriented design [J].IEEE Transactions on Software Engineering,1994,20(6):476-493.
[7] Briand L C,Daly J W,Wuest J.A unified framework for cohesion measurement in object-oriented systems [J]. Empirical Software Engineering Journal,1998,3(1):65-117.
[8] Sheetz S D,Tegarden D P,Monarchi D E.Measuring object oriented system complexity [C] //Proceedings of the 1st International Workshop on Information Technologies and Systems.Boston,MA,USA,1991:285-307.
[9] Ott L M,Thuss J J.Slice based metrics for estimating cohesion [C] //Proceedings of the 1st International Software Metrics Symposium.Baltimore,MD,USA,1993:71-81.
[10] Simon F,Loffler S,Lewerentz C.Distance based cohesion measuring [C] //Proceedings of the 2nd European Software Measurement Conference.Amsterdam,Netherlands,1999:69-83.
[11] Weiser M.Program slicing [J]. IEEE Transactions on Software Engineering,1984,10(4):352-357.
[12] Ottenstein K J,Ottenstein L M.The program dependence graph in a software development environment [C] //Proceedings of the 1st ACM SIGSOFT/SIG-PLAN Software Engineering Symposium on Practical Software Development Environments.Pittsburgh,PA,USA,1984:177-184.
[13] Horwitz S,Reps T,Binkley D.Interprocedural slicing using dependence graphs [J].ACM Transactions on Programming Languages and Systems,1990,12(1):26-60.
[14] Larsen L,Harrold M J.Slicing object-oriented software [C] //Proceedings of the 18th International Conference on Software Engineering.Berlin,Germany,1996:495-505.

备注/Memo

备注/Memo:
作者简介: 张重峰(1984—),男,硕士生; 李必信(联系人),男,博士,教授,博士生导师,bx.li@seu.edu.cn.
基金项目: 国家自然科学基金资助项目(60773105)、国家高技术研究发展计划(863计划)资助项目(2007AA01Z141)、教育部新世纪优秀人才支持计划资助项目(NCET-06-0466).
引文格式: 张重峰,李必信,孙小兵,等.基于切片度量的重构对象识别[J].东南大学学报:自然科学版,2010,40(2):275-281. [doi:10.3969/j.issn.1001-0505.2010.02.011]
更新日期/Last Update: 2010-03-20