首页 | 本学科首页   官方微博 | 高级检索  
     

代码依恋检测与重构研究
引用本文:刘丹丹,赵逢禹. 代码依恋检测与重构研究[J]. 电子科技, 2016, 29(11): 70
作者姓名:刘丹丹  赵逢禹
作者单位:(上海理工大学 光电信息与计算机工程学院,上海 200093)
基金项目:国家质检公益性行业科研专项基金资助项目(201310032-3)
摘    要:代码依恋是指一个类中的方法对其他类的兴趣高于定义此方法的类的一种代码坏味道。文中基于代码依恋的思想,给出代码依恋度的定义与度量方法,设计了代码依恋检测算法,并设计出一种工具BADFeature检测代码依恋味道且重构代码。经实验证实,BADFeature能检测代码依恋味道,且可通过重构消除代码味道。

关 键 词:代码依恋  坏味道    检测  重构  

Detecting Analysis for Feature Envy and Code Refactoring
LIU Dandan,ZHAO Fengyu. Detecting Analysis for Feature Envy and Code Refactoring[J]. Electronic Science and Technology, 2016, 29(11): 70
Authors:LIU Dandan  ZHAO Fengyu
Affiliation:(School of Optical-Electrical and Computer Engineering,University of Shanghai for Science and Technology,Shanghai 200093, China)
Abstract:Feature envy is a kind of bad smells of codes, which occurs when a method of a class is more interested in some other classes than that in the class itself. Based on feature envy essential concepts, a definition for feature envy is proposed and its measuring method is provided. A feature envy detecting algorithm is introduced and a tool BADFeature is developed to detect feature envy and to refactory it. The experimental results show that BADFeature can detect feature envy and eliminate it through refactoring.
Keywords:feature envy  bad smell  degree  detect  refactoring  
点击此处可从《电子科技》浏览原始摘要信息
点击此处可从《电子科技》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号