ASE 2024
Sun 27 October - Fri 1 November 2024 Sacramento, California, United States
Thu 31 Oct 2024 15:45 - 16:00 at Carr - Code smells

God classes are widely recognized as code smells, significantly impairing the maintainability and readability of source code. However, resolving the identified God classes remains a formidable challenge, and we still lack automated and accurate tools to resolve God classes automatically. To this end, in this paper, we propose a novel approach (called \textit{ClassSplitter}) to decompose God classes. The key observation behind the proposed approach is that software entities (i.e., methods and fields) that are physically adjacent often have strong semantic correlations and thus have a great chance of being classified into the same class during God class deposition. We validate this hypothesis by analyzing 54 God class decomposition refactorings actually conducted in the wild. According to the observation, we measure the similarity between software entities by exploiting not only traditional code metrics but also their relative physical positions. Based on the similarity, we customize a clustering algorithm to classify the methods within a given God class, and each of the resulting clusters is taken as a new class. Finally, ClassSplitter allocates the fields of the God class to the new classes according to the field-access-based coupling between fields and classes. We evaluate ClassSplitter using 133 real-world God classes from open-source applications. Our evaluation results suggest that ClassSplitter could substantially improve the state of the art in God class decomposition, improving the average MoJoFM by 47%. Manual evaluation also confirmed that in most cases (77%) the solutions suggested by ClassSplitter were preferred by developers to alternatives suggested by the state-of-the-art baseline approach.

Thu 31 Oct

Displayed time zone: Pacific Time (US & Canada) change

15:30 - 16:30
15:30
15m
Talk
iSMELL: Assembling LLMs with Expert Toolsets for Code Smell Detection and Refactoring
Research Papers
Di Wu , Fangwen Mu Institute of Software, Chinese Academy of Sciences, Lin Shi Beihang University, Zhaoqiang Guo Software Engineering Application Technology Lab, Huawei, China, Kui Liu Huawei, Weiguang Zhuang Beihang University, Yuqi Zhong Beihang University, Li Zhang Beihang University
15:45
15m
Talk
A Position-Aware Approach to Decomposing God Classes
Research Papers
Tianyi Chen Beijing Institute of Technology, Yanjie Jiang Peking University, Fu Fan Beijing Institute of Technology, Bo Liu Beijing Institute of Technology, Hui Liu Beijing Institute of Technology
16:00
15m
Talk
Three Heads Are Better Than One: Suggesting Move Method Refactoring Opportunities with Inter-class Code Entity Dependency Enhanced Hybrid Hypergraph Neural Network
Research Papers
Di Cui Xidian University, Jiaqi Wang Xidian University, Qiangqiang Wang Xidian University, Peng Ji Xidian University, Minglang Qiao Xidian University, Yutong Zhao University of Central Missouri, Jingzhao Hu Xidian University, Luqiao Wang Xidian University, Qingshan Li Xidian University
16:15
10m
Talk
Copilot-in-the-Loop: Fixing Code Smells in Copilot-Generated Python Code using Copilot
NIER Track
Beiqi Zhang Wuhan University, Peng Liang Wuhan University, China, Qiong Feng Nanjing University of Science and Technology, Yujia Fu Wuhan University, Zengyang Li Central China Normal University
DOI Pre-print