一种基于深度学习的上帝类检测方法
作者:
作者单位:

作者简介:

卜依凡(1995-),女,山西侯马人,硕士生,主要研究领域为软件重构;李光杰(1980-),女,博士生,主要研究领域为软件重构,软件质量;刘辉(1978-),男,博士,教授,博士生导师,CCF高级会员,主要研究领域为软件重构,软件质量,软件测试,智能化软件开发环境.

通讯作者:

刘辉,E-mail:liuhui08@bit.edu.cn

中图分类号:

基金项目:

国家重点研发计划(2016YFB1000801);国家自然科学基金(61690205,61772071,61472034)


God Class Detection Approach Based on Deep Learning
Author:
Affiliation:

Fund Project:

National Key Research and Development Program of China (2016YFB1000801); National Natural Science Foundation of China (61690205, 61772071, 61472034)

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

    上帝类是指某个承担了本应由多个类分别承担的多个职责的类.上帝类违背了分而治之的基本思想以及单一职责的设计原则,严重影响软件的可维护性和可理解性.但上帝类又是一种比较常见的代码坏味.因此,针对上帝类的检测与重构一直是代码重构领域的研究热点之一.为此,提出了一种基于深度神经网络的上帝类检测方法.该方法不仅利用了常见的软件度量,而且充分利用了代码中的文本信息,意图通过挖掘文本语义揭示每个类所承担的主要角色.此外,为了解决有监督深度学习所需的海量标签数据,提出了一种基于开源代码构造标签数据的方法.最后,基于开源数据集对所提出的方法进行了实验验证.实验结果表明,这些方法优于现有的上帝类检测方法,尤其是在查全率上有大幅度的提升(提高了35.58%).

    Abstract:

    God class refers to certain classes that have assumed more than one functionality, which obey the single responsibility principle and consequently impact on the maintainability and intelligibility of software system. Studies, detection and refactoring included, of god class have always attracted research attentions because of its commonness. As a result, a neural network based detection approach is proposed to detect god class code smell. This detection technology not only makes use of common metrics in software, but also exploits the textual information in source code, which is intended to reveal the main roles that the class plays through mining text semantics. In addition, in order to solve the massive labeled data required for supervised deep learning, an approach is proposed to construct labeled data based on open source code. Finally, the proposed approach is evaluated on an open source data set. The result of evaluation shows that the proposed approach outperforms the current method, especially the recall has been greatly improved by 35.58%.

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

卜依凡,刘辉,李光杰.一种基于深度学习的上帝类检测方法.软件学报,2019,30(5):1359-1374

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

京公网安备 11040202500063号