跳到主要导航 跳到搜索 跳到主要内容

Deep Learning Based Feature Envy Detection Boosted by Real-World Examples

  • Bo Liu
  • , Hui Liu*
  • , Guangjie Li
  • , Nan Niu
  • , Zimao Xu
  • , Yifan Wang
  • , Yunni Xia
  • , Yuxia Zhang
  • , Yanjie Jiang*
  • *此作品的通讯作者
  • Beijing Institute of Technology
  • National Innovation Institute of Defense Technology
  • University of Cincinnati
  • Huawei Cloud
  • Chongqing University
  • Peking University

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

Feature envy is one of the well-recognized code smells that should be removed by software refactoring. A major challenge in feature envy detection is that traditional approaches are less accurate whereas deep learning-based approaches are suffering from the lack of high-quality large-scale training data. Although existing refactoring detection tools could be employed to discover real-world feature envy examples, the noise (i.e., false positives) within the resulting data could significantly influence the quality of the training data as well as the performance of the models trained on the data. To this end, in this paper, we propose a sequence of heuristic rules and a decision tree-based classifier to filter out false positives reported by state-of-the-art refactoring detection tools. The data after filtering serve as the positive items in the requested training data. From the same subject projects, we randomly select methods that are different from positive items as negative items. With the real-world examples (both positive and negative examples), we design and train a deep learning-based binary model to predict whether a given method should be moved to a potential target class. Different from existing models, it leverages additional features, i.e., coupling between methods and classes (CBMC) and the message passing coupling between methods and classes (MCMC) that have not yet been exploited by existing approaches. Our evaluation results on real-world open-source projects suggest that the proposed approach substantially outperforms the state of the art in feature envy detection, improving precision and recall by 38.5% and 20.8%, respectively.

源语言英语
主期刊名ESEC/FSE 2023 - Proceedings of the 31st ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering
编辑Satish Chandra, Kelly Blincoe, Paolo Tonella
出版商Association for Computing Machinery, Inc
908-920
页数13
ISBN(电子版)9798400703270
DOI
出版状态已出版 - 30 11月 2023
活动31st ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/FSE 2023 - San Francisco, 美国
期限: 3 12月 20239 12月 2023

出版系列

姓名ESEC/FSE 2023 - Proceedings of the 31st ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering

会议

会议31st ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/FSE 2023
国家/地区美国
San Francisco
时期3/12/239/12/23

指纹

探究 'Deep Learning Based Feature Envy Detection Boosted by Real-World Examples' 的科研主题。它们共同构成独一无二的指纹。

引用此