Affiliation:
1. Zhejiang Gongshang University, China
2. Oakland University, USA
3. Xi’an Jiaotong University, China
4. Central China Normal University, China
Abstract
The
fractal property
has been regarded as a fundamental property of complex networks, characterizing the
self-similarity
of a network. Such a property is usually numerically characterized by the
fractal dimension
metric, and it not only helps the understanding of the relationship between the structure and function of complex networks, but also finds a wide range of applications in complex systems. The existing literature shows that class-level software networks (i.e., class dependency networks) are complex networks with the fractal property. However, the fractal property at the feature (i.e., methods and fields) level has never been investigated, although it is useful for measuring class complexity and predicting bugs in classes. Furthermore, existing studies on the fractal property of software systems were all performed on un-weighted software networks and have not been used in any practical quality assurance tasks such as bug prediction. Generally, considering the weights on edges can give us more accurate representations of the software structure and thus help us obtain more accurate results. The illustration of an approach’s practical use can promote its adoption in practice. In this paper, we examine the
fractal property
of classes by proposing a new metric. Specifically, we build an FLSN (
F
eature
L
evel
S
oftware
N
etwork) for each class to represent the methods/fields and their couplings (including coupling frequencies) within the class, and propose a new metric, (
F
ractal
D
imension for
C
lasses), to numerically describe the fractal property of classes using FLSNs, which captures class complexity. We evaluate theoretically against Weyuker’s nine properties, and the results show that adheres to eight of the nine properties. Empirical experiments performed on a set of twelve large open-source Java systems show that i) for most classes (larger than
\(96\%\)
), there exists the fractal property in their FLSNs, ii) is capable of capturing additional aspects of class complexity that have not been addressed by existing complexity metrics, iii) significantly correlates with both the existing class-level complexity metrics and the number of bugs in classes, and iv), when used together with existing class-level complexity metrics, can significantly improve bug prediction in classes in three scenarios (i.e.,
bug-count
,
bug-classification
, and
effort-aware
) of the
cross-project
context, but in the
within-project
context, it cannot.
Publisher
Association for Computing Machinery (ACM)
Reference136 articles.
1. Power quality disturbance classification using the inductive inference approach;Abdel-Galil TK;IEEE Trans. Power Deliv.,2004
2. F Brito Abreu, Miguel Goulão, and Rita Esteves. 1995. Toward the design quality evaluation of object-oriented software systems. In Proceedings of the 5th International Conference on Software Quality. 44–57.
3. A precise method-method interaction-based cohesion metric for object-oriented classes;Dallal Jehad Al;ACM Trans. Softw. Eng. Methodol.,2012
4. Maurício Aniche. 2015. Java code metrics calculator (CK). Available at https://github.com/mauricioaniche/ck/.
5. A feature dependent Naive Bayes approach and its application to the software defect prediction problem;Arar Ömer Faruk;Appl. Soft Comput.,2017