Lehui Weng

dblp:337/2857 · DBLP profile ↗
← Back
2ranked-venue papers
0as first author
2since 2021 · last 2025
—ORCID · none

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 2 · 2 since 2021
YearPublicationVenuePosition
2025 Efficient feature envy detection and refactoring based on graph neural network
Dongjin Yu, Lehui Weng, Jie Chen 0060, Xin Chen 0032, Quanxin Yang
Autom. Softw. Eng.3
2022 Detecting and Refactoring Feature Envy Based on Graph Neural Network
abstract
As one of the most common code smells, feature envy reduces the cohesion of classes and increases the coupling between classes, thus leading to difficulty of software maintainability. Though many studies have made good achievements on feature envy detection, they often despise or even ignore the inherent calling relationships between methods, causing unimpressive detection efficiency. To address this problem, we propose a Graph Neural Network (GNN) based approach towards feature envy detection. We first collect code metrics and calling relationships, and then convert them to the form of a graph, where the node represents the code metrics of a method and the edge represents the calling relationship between methods. Particularly, considering the unbalance of positive and negative samples, we introduce a graph augmenter to obtain an enhanced graph. Finally, we feed the enhanced graph into a GNN model for training and predicting. We conducted extensive experiments on a dataset containing five open-source software projects. The result shows that our approach achieves 78.90% in terms of average F1-score, which is 37.98% absolutely higher than the best comparison approach. Besides, we propose a refactoring recommendation approach based on calling strength. It achieves 61.44% of accuracy, which is 5.13% absolutely higher than the best competitive. Our code and datasets are available at https://github.com/HduDBSI/Feature-Envy-Detection.
Dongjin Yu, Lehui Weng, Jie Chen 0060, Xin Chen 0032, Quanxin Yang
ISSRE3