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

代码坏味对软件演化影响的实证研究
引用本文:章晓芳,朱灿.代码坏味对软件演化影响的实证研究[J].软件学报,2019,30(5):1422-1437.
作者姓名:章晓芳  朱灿
作者单位:苏州大学 计算机科学与技术学院, 江苏 苏州 215006,苏州大学 计算机科学与技术学院, 江苏 苏州 215006
基金项目:国家自然科学基金(61772263,61772014,61572375);苏州市科技发展计划(SYG201807);软件新技术与产业化协同创新中心资助项目
摘    要:代码坏味是指程序设计中存在的不良设计模式或设计缺陷.坏味的存在,被认为会阻碍软件的演化与维护.近年来,研究人员致力于探究坏味产生的影响以及坏味与软件演化之间的关系.已有研究表明,代码坏味会随着软件的演化而不断发生变化.通常,软件的演化将涉及源文件的增加、修改与删除这3类具体操作,了解代码坏味与软件演化中源文件操作的关系,将有助于开发者更好地计划软件开发过程和重构软件代码.因此,针对13种常见的坏味,在8个Java项目共计104个版本中进行了系统的实证研究.研究发现,随着软件版本的演化,含代码坏味的文件在整个项目中的占比在不同的项目中呈现出不同的特征.另外,包含代码坏味的文件更倾向于被修改,而坏味本身与文件的添加或者删除并没有太大的关联.更进一步地,在探究的所有坏味中,有几种特定的坏味对文件的修改产生了显著的影响,且这些坏味文件间存在着明显的重叠.这些发现有助于开发人员更好地了解代码坏味,以便于更好地对软件进行维护.

关 键 词:软件维护  反模式  代码坏味  实证研究  软件演化
收稿时间:2018/9/2 0:00:00
修稿时间:2018/10/31 0:00:00

Empirical Study of Code Smell Impact on Software Evolution
ZHANG Xiao-Fang and ZHU Can.Empirical Study of Code Smell Impact on Software Evolution[J].Journal of Software,2019,30(5):1422-1437.
Authors:ZHANG Xiao-Fang and ZHU Can
Affiliation:School of Computer Science and Technology, Soochow University, Suzhou 215006, China and School of Computer Science and Technology, Soochow University, Suzhou 215006, China
Abstract:Code smells refer to poor design patterns or design defects that are considered to have negative impacts on software evolution and maintenance. Many researchers have been devoted into studies on these effects and correlations in recent years. Previous researches indicated that code smells might vary with the evolution of software. In normal cases, the software evolution involves addition, modification, and deletion of source files. Therefore, the understanding of the correlations between code smells and software evolution will be helpful for developers in scheduling the development process and in code refactoring. Thus, in this study, on 8 popular Java projects with 104 released versions, an extensive empirical study is conducted to investigate 13 kinds of code smells. It is found that, as the software evolves, the proportion of files that contain code smell in all files reflects different characteristics in different projects. Additionally, the files containing smells are prone to be modified while the smells are not strongly correlated with adding or deleting files. Furthermore, among all the smells studied, some certain ones have significant impact on the file changes and obvious overlap exists in these specific smelly files. These findings are beneficial for developers to achieve in-depth comprehension of code smells, which will lead to better software maintenance.
Keywords:software maintenance  anti-pattern  code smell  empirical study  software evolution
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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