CoreBug: Improving Effort-Aware Bug Prediction in Software Systems Using Generalized <i>k</i>-Core Decomposition in Class Dependency Networks

Complex network theory has been successfully introduced into the field of software engineering. Many works in the literature have built complex networks in software, usually called software networks, to represent software structure. Such software networks and their related graph algorithms have been...

Full description

Bibliographic Details
Main Authors: Xin Du, Tian Wang, Liuhai Wang, Weifeng Pan, Chunlai Chai, Xinxin Xu, Bo Jiang, Jiale Wang
Format: Article
Language:English
Published: MDPI AG 2022-04-01
Series:Axioms
Subjects:
Online Access:https://www.mdpi.com/2075-1680/11/5/205
_version_ 1797501605353881600
author Xin Du
Tian Wang
Liuhai Wang
Weifeng Pan
Chunlai Chai
Xinxin Xu
Bo Jiang
Jiale Wang
author_facet Xin Du
Tian Wang
Liuhai Wang
Weifeng Pan
Chunlai Chai
Xinxin Xu
Bo Jiang
Jiale Wang
author_sort Xin Du
collection DOAJ
description Complex network theory has been successfully introduced into the field of software engineering. Many works in the literature have built complex networks in software, usually called software networks, to represent software structure. Such software networks and their related graph algorithms have been proved effective in predicting software bugs. However, the software networks used were unweighted and undirected, neglecting the strength and direction of the couplings. Worse still, they ignored many important types of couplings between classes, such as <i>local variable</i>, <i>instantiates</i>, and <i>access</i>. All of these greatly affect the accuracy of the software network in representing the topological detail of software projects and ultimately affect the metrics derived from it. In this work, an improved effort-aware bug prediction approach named CoreBug is proposed. First, CoreBug uses a weighted directed class dependency network (WDCDN) to precisely describe classes and their couplings, including nine coupling types and their different coupling strengths and directions. Second, a generalized <i>k</i>-core decomposition is introduced to compute the <i>coreness</i> of each class in the WDCDN. Third, CoreBug combines the <i>coreness</i> of each class with its <i>relative risk</i>, as returned by the logistic regression, to quantify the risk of a given class being buggy. Empirical results on eighteen Java projects show that CoreBug is superior to the state-of-the-art approaches according to the average ranking of the Friedman test.
first_indexed 2024-03-10T03:20:56Z
format Article
id doaj.art-e1f098d9aa0048429179f04f82db0da0
institution Directory Open Access Journal
issn 2075-1680
language English
last_indexed 2024-03-10T03:20:56Z
publishDate 2022-04-01
publisher MDPI AG
record_format Article
series Axioms
spelling doaj.art-e1f098d9aa0048429179f04f82db0da02023-11-23T10:04:03ZengMDPI AGAxioms2075-16802022-04-0111520510.3390/axioms11050205CoreBug: Improving Effort-Aware Bug Prediction in Software Systems Using Generalized <i>k</i>-Core Decomposition in Class Dependency NetworksXin Du0Tian Wang1Liuhai Wang2Weifeng Pan3Chunlai Chai4Xinxin Xu5Bo Jiang6Jiale Wang7School of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou 310018, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou 310018, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou 310018, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou 310018, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou 310018, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou 310018, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou 310018, ChinaSchool of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou 310018, ChinaComplex network theory has been successfully introduced into the field of software engineering. Many works in the literature have built complex networks in software, usually called software networks, to represent software structure. Such software networks and their related graph algorithms have been proved effective in predicting software bugs. However, the software networks used were unweighted and undirected, neglecting the strength and direction of the couplings. Worse still, they ignored many important types of couplings between classes, such as <i>local variable</i>, <i>instantiates</i>, and <i>access</i>. All of these greatly affect the accuracy of the software network in representing the topological detail of software projects and ultimately affect the metrics derived from it. In this work, an improved effort-aware bug prediction approach named CoreBug is proposed. First, CoreBug uses a weighted directed class dependency network (WDCDN) to precisely describe classes and their couplings, including nine coupling types and their different coupling strengths and directions. Second, a generalized <i>k</i>-core decomposition is introduced to compute the <i>coreness</i> of each class in the WDCDN. Third, CoreBug combines the <i>coreness</i> of each class with its <i>relative risk</i>, as returned by the logistic regression, to quantify the risk of a given class being buggy. Empirical results on eighteen Java projects show that CoreBug is superior to the state-of-the-art approaches according to the average ranking of the Friedman test.https://www.mdpi.com/2075-1680/11/5/205bug predictioncomplex networkk-core decompositionclass dependency networkeffort-aware bug prediction
spellingShingle Xin Du
Tian Wang
Liuhai Wang
Weifeng Pan
Chunlai Chai
Xinxin Xu
Bo Jiang
Jiale Wang
CoreBug: Improving Effort-Aware Bug Prediction in Software Systems Using Generalized <i>k</i>-Core Decomposition in Class Dependency Networks
Axioms
bug prediction
complex network
k-core decomposition
class dependency network
effort-aware bug prediction
title CoreBug: Improving Effort-Aware Bug Prediction in Software Systems Using Generalized <i>k</i>-Core Decomposition in Class Dependency Networks
title_full CoreBug: Improving Effort-Aware Bug Prediction in Software Systems Using Generalized <i>k</i>-Core Decomposition in Class Dependency Networks
title_fullStr CoreBug: Improving Effort-Aware Bug Prediction in Software Systems Using Generalized <i>k</i>-Core Decomposition in Class Dependency Networks
title_full_unstemmed CoreBug: Improving Effort-Aware Bug Prediction in Software Systems Using Generalized <i>k</i>-Core Decomposition in Class Dependency Networks
title_short CoreBug: Improving Effort-Aware Bug Prediction in Software Systems Using Generalized <i>k</i>-Core Decomposition in Class Dependency Networks
title_sort corebug improving effort aware bug prediction in software systems using generalized i k i core decomposition in class dependency networks
topic bug prediction
complex network
k-core decomposition
class dependency network
effort-aware bug prediction
url https://www.mdpi.com/2075-1680/11/5/205
work_keys_str_mv AT xindu corebugimprovingeffortawarebugpredictioninsoftwaresystemsusinggeneralizedikicoredecompositioninclassdependencynetworks
AT tianwang corebugimprovingeffortawarebugpredictioninsoftwaresystemsusinggeneralizedikicoredecompositioninclassdependencynetworks
AT liuhaiwang corebugimprovingeffortawarebugpredictioninsoftwaresystemsusinggeneralizedikicoredecompositioninclassdependencynetworks
AT weifengpan corebugimprovingeffortawarebugpredictioninsoftwaresystemsusinggeneralizedikicoredecompositioninclassdependencynetworks
AT chunlaichai corebugimprovingeffortawarebugpredictioninsoftwaresystemsusinggeneralizedikicoredecompositioninclassdependencynetworks
AT xinxinxu corebugimprovingeffortawarebugpredictioninsoftwaresystemsusinggeneralizedikicoredecompositioninclassdependencynetworks
AT bojiang corebugimprovingeffortawarebugpredictioninsoftwaresystemsusinggeneralizedikicoredecompositioninclassdependencynetworks
AT jialewang corebugimprovingeffortawarebugpredictioninsoftwaresystemsusinggeneralizedikicoredecompositioninclassdependencynetworks