Identifying Key Classes for Initial Software Comprehension: Can We Do It Better?
Weifeng Pan, Xin Du, Ming Hua, Dae-Kyoo Kim, Zijiang Yang
Abstract
Key classes are excellent starting points for developers, especially newcomers, to comprehend an unknown software system. Though many unsupervised key class identification approaches have been proposed in the literature by representing software as class dependency networks (aka software networks) and using some network metrics (e.g., h-index, a-index, and coreness), they are never aware of the field where the nodes exist and the effect of the field on the importance of the nodes in it. According to the classic field theory in physics, every material particle is in a field through which they exert an impact on other particles in the field via non-contact interactions (e.g., electromagnetic force, gravity, and nuclear force). Similarly, every node in a software network might also exist in a field, which might affect the importance of class nodes in it. In this paper, we propose an approach, iFit, to identify key classes in object-oriented software systems. First, we represent software as a CSN <inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">WD</inf> (Weighted Directed Class-level Software Network) to capture the topological structure of software, including classes, their couplings, and the direction and strength of couplings. Second, we assume that the nodes in the CSN <inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">WD</inf> exist in a gravitation-like field and propose a new metric, CG (Cumulative Gravitation-like importance), to measure the importance of classes. CG is inspired by Newton's gravitational formula and uses the PageRank value computed by a biased-PageRank algorithm as the masses of classes. Finally, classes in the system are sorted in descending order according to their CG values, and a cutoff is utilized, that is, the top-ranked classes are recommended as key classes. The experiments were performed on a data set composed of six open-source Java systems from the literature. The results show that iFit is superior to the baseline approaches on 93.75% of the total cases, and is scalable to large-scale software systems. Besides, we find that iFit is neutral to the weighting mechanisms used to assign the weights for different coupling types in the CSN <inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">WD</inf> , that is, when applying iFit to identify key classes, we can use any one of the weighting mechanisms.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get efb99da6-6c0a-4fa5-aa22-cf9676cece37Related papers
- A Position-Aware Approach to Decomposing God ClassesTianyi Chen, Yanjie Jiang, Fu Fan, Bo Liu et al.ASE 2024 · 2 citations
- Code Recommendation for Open Source Software DevelopersYiqiao Jin, Yunsheng Bai, Yanqiao Zhu, Yizhou Sun et al.WWW 2023 · 28 citations
- SSAR: A Novel Software Architecture Recovery Approach Enhancing Accuracy and ScalabilityWei Ding, Ran Mo, Chaochao Wu, Haopeng SongICSE 2026
- Githru: Visual Analytics for Understanding Software Development History Through Git Metadata AnalysisYoungtaek Kim, Jaeyoung Kim, Hyeon Jeon, Young-Ho Kim et al.IEEE VIS 2020 · 36 citations
- Efficient Core Propagation Based Hierarchical Graph ClusteringJinbin Huang, Zihan Jia, Xin HuangICDE 2025
