{"title":"Exploring better alternatives to size metrics for explainable software defect prediction","authors":"Chenchen Chai, Guisheng Fan, Huiqun Yu, Zijie Huang, Jianshu Ding, Yao Guan","doi":"10.1007/s11219-023-09656-y","DOIUrl":null,"url":null,"abstract":"<p>Delivering reliable software under the constraint of limited time and budget is a significant challenge. Recent progress in software defect prediction is helping developers to locate defect-prone code components and allocate quality assurance resources more efficiently. However, practitioners’ criticisms on defect predictors from academia are not practical since they rely heavily on size metrics such as lines of code (LOC), which over-abstracts technical details and provides limited insights for software maintenance. Thus, the performance of predictors may be overclaimed. In response, based on a state-of-the-art defect prediction model, we (1) exclude size metrics and evaluate the impact on performance, (2) include new features such as network dependency metrics, and (3) explore which ones are better alternatives to size metrics using explainable artificial intelligence (XAI) technique. We find that excluding size metrics decreases model performance by 1.99% and 0.66% on AUC-ROC in within- and cross-project prediction respectively. The results show that two involved network dependence metrics (i.e., Betweenness and pWeakC(out)) and four other code metrics (i.e., LCOM, AVG(CC), LCOM3, and CAM) could effectively preserve or improve the prediction performance, even if we exclude size metrics. In conclusion, we suggest discarding size metrics and involving the mentioned network dependency metrics for better performance and explainability.\n</p>","PeriodicalId":21827,"journal":{"name":"Software Quality Journal","volume":"43 7 1","pages":""},"PeriodicalIF":1.7000,"publicationDate":"2023-12-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Software Quality Journal","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1007/s11219-023-09656-y","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Delivering reliable software under the constraint of limited time and budget is a significant challenge. Recent progress in software defect prediction is helping developers to locate defect-prone code components and allocate quality assurance resources more efficiently. However, practitioners’ criticisms on defect predictors from academia are not practical since they rely heavily on size metrics such as lines of code (LOC), which over-abstracts technical details and provides limited insights for software maintenance. Thus, the performance of predictors may be overclaimed. In response, based on a state-of-the-art defect prediction model, we (1) exclude size metrics and evaluate the impact on performance, (2) include new features such as network dependency metrics, and (3) explore which ones are better alternatives to size metrics using explainable artificial intelligence (XAI) technique. We find that excluding size metrics decreases model performance by 1.99% and 0.66% on AUC-ROC in within- and cross-project prediction respectively. The results show that two involved network dependence metrics (i.e., Betweenness and pWeakC(out)) and four other code metrics (i.e., LCOM, AVG(CC), LCOM3, and CAM) could effectively preserve or improve the prediction performance, even if we exclude size metrics. In conclusion, we suggest discarding size metrics and involving the mentioned network dependency metrics for better performance and explainability.
期刊介绍:
The aims of the Software Quality Journal are:
(1) To promote awareness of the crucial role of quality management in the effective construction of the software systems developed, used, and/or maintained by organizations in pursuit of their business objectives.
(2) To provide a forum of the exchange of experiences and information on software quality management and the methods, tools and products used to measure and achieve it.
(3) To provide a vehicle for the publication of academic papers related to all aspects of software quality.
The Journal addresses all aspects of software quality from both a practical and an academic viewpoint. It invites contributions from practitioners and academics, as well as national and international policy and standard making bodies, and sets out to be the definitive international reference source for such information.
The Journal will accept research, technique, case study, survey and tutorial submissions that address quality-related issues including, but not limited to: internal and external quality standards, management of quality within organizations, technical aspects of quality, quality aspects for product vendors, software measurement and metrics, software testing and other quality assurance techniques, total quality management and cultural aspects. Other technical issues with regard to software quality, including: data management, formal methods, safety critical applications, and CASE.