代码坏味对软件演化影响的实证研究
作者:
作者单位:

作者简介:

章晓芳(1980-),女,福建连江人,博士,副教授,CCF专业会员,主要研究领域为软件分析与测试,众包软件工程,强化学习;朱灿(1995-),女,硕士生,CCF学生会员,主要研究领域为软件分析与测试,代码坏味.

通讯作者:

章晓芳,E-mail:xfzhang@suda.edu.cn

中图分类号:

基金项目:

国家自然科学基金(61772263,61772014,61572375);苏州市科技发展计划(SYG201807);软件新技术与产业化协同创新中心资助项目


Empirical Study of Code Smell Impact on Software Evolution
Author:
Affiliation:

Fund Project:

National Natural Science Foundation of China (61772263, 61772014, 61572375); Suzhou Technology Development Plan (SYG201807); Fund of Collaborative Innovation Center of Novel Software Technology and Industrialization

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    代码坏味是指程序设计中存在的不良设计模式或设计缺陷.坏味的存在,被认为会阻碍软件的演化与维护.近年来,研究人员致力于探究坏味产生的影响以及坏味与软件演化之间的关系.已有研究表明,代码坏味会随着软件的演化而不断发生变化.通常,软件的演化将涉及源文件的增加、修改与删除这3类具体操作,了解代码坏味与软件演化中源文件操作的关系,将有助于开发者更好地计划软件开发过程和重构软件代码.因此,针对13种常见的坏味,在8个Java项目共计104个版本中进行了系统的实证研究.研究发现,随着软件版本的演化,含代码坏味的文件在整个项目中的占比在不同的项目中呈现出不同的特征.另外,包含代码坏味的文件更倾向于被修改,而坏味本身与文件的添加或者删除并没有太大的关联.更进一步地,在探究的所有坏味中,有几种特定的坏味对文件的修改产生了显著的影响,且这些坏味文件间存在着明显的重叠.这些发现有助于开发人员更好地了解代码坏味,以便于更好地对软件进行维护.

    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.

    参考文献
    相似文献
    引证文献
引用本文

章晓芳,朱灿.代码坏味对软件演化影响的实证研究.软件学报,2019,30(5):1422-1437

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2018-09-02
  • 最后修改日期:2018-10-31
  • 录用日期:
  • 在线发布日期: 2019-05-08
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号