一句话:提出 iFit,用类依赖网络与类引力场度量 CG 识别面向对象软件的关键类,优于基线且可扩展。
针对理解未知软件系统时关键类识别问题,现有无监督方法将软件表示为类依赖网络并采用 h-index、a-index、coreness 等指标,但未考虑节点所处“场”对其重要性的影响。作者提出 iFit:先将面向对象软件建模为加权有向类级软件网络 CSNWD,刻画类、耦合及其方向与强度;再假设节点处于类引力场,受牛顿引力公式启发定义累积类引力重要性 CG,并以偏置 PageRank 值作为类质量;最后按 CG 降序排序并用截断推荐关键类。在六个开源 Java 系统上的实验表明,iFit 在 93.75% 案例中优于基线,可扩展至大规模软件,且对 CSNWD 中不同耦合类型的权重机制不敏感。
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 CSNWD (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 CSNWD 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 CSNWD, that is, when applying iFit to identify key classes, we can use any one of the weighting mechanisms.
@inproceedings{PanDHKY23,
title = {Identifying Key Classes for Initial Software Comprehension: Can We Do It Better?},
author = {Weifeng Pan and Xin Du and Hua Ming and Dae-Kyoo Kim and Zijiang Yang},
booktitle = {ICSE},
year = {2023},
doi = {10.1109/icse48619.2023.00160}
}