The impact of context metrics on just-in-time defect prediction

被引:42
|
作者
Kondo, Masanari [1 ]
German, Daniel M. [2 ]
Mizuno, Osamu [1 ]
Choi, Eun-Hye [3 ]
机构
[1] Kyoto Inst Technol, Software Engn Lab, Kyoto, Japan
[2] Univ Victoria, Dept Comp Sci, Victoria, BC, Canada
[3] Informat Technol Res Inst, Natl Inst Adv Ind Sci, Technol, Sapporo, Japan
基金
日本学术振兴会; 加拿大自然科学与工程研究理事会;
关键词
Just-in-time defect prediction; Defect prediction; Source code changes; Context lines; Changed lines; Indentation metrics; Code churn metrics; SOFTWARE CHANGES; CODE CHURN; COMPLEXITY; FAULTS;
D O I
10.1007/s10664-019-09736-3
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Traditional just-in-time defect prediction approaches have been using changed lines of software to predict defective-changes in software development. However, they disregard information around the changed lines. Our main hypothesis is that such information has an impact on the likelihood that the change is defective. To take advantage of this information in defect prediction, we consider n-lines (n = 1,2, horizontal ellipsis ) that precede and follow the changed lines (which we call context lines), and propose metrics that measure them, which we call "Context Metrics." Specifically, these context metrics are defined as the number of words/keywords in the context lines. In a large-scale empirical study using six open source software projects, we compare the performance of using our context metrics, traditional code churn metrics (e.g., the number of modified subsystems), our extended context metrics which measure not only context lines but also changed lines, and combination metrics that use two extended context metrics at a prediction model for defect prediction. The results show that context metrics that consider the context lines of added-lines achieve the best median value in all cases in terms of a statistical test. Moreover, using few number of context lines is suitable for context metric that considers words, and using more number of context lines is suitable for context metric that considers keywords. Finally, the combination metrics of two extended context metrics significantly outperform all studied metrics in all studied projects w. r. t. the area under the receiver operation characteristic curve (AUC) and Matthews correlation coefficient (MCC).
引用
收藏
页码:890 / 939
页数:50
相关论文
共 50 条
  • [1] The impact of context metrics on just-in-time defect prediction
    Masanari Kondo
    Daniel M. German
    Osamu Mizuno
    Eun-Hye Choi
    Empirical Software Engineering, 2020, 25 : 890 - 939
  • [2] The Impact of Duplicate Changes on Just-in-Time Defect Prediction
    Duan, Ruifeng
    Xu, Haitao
    Fan, Yuanrui
    Yan, Meng
    IEEE TRANSACTIONS ON RELIABILITY, 2022, 71 (03) : 1294 - 1308
  • [3] The Impact of Mislabeled Changes by SZZ on Just-in-Time Defect Prediction
    Fan, Yuanrui
    Xia, Xin
    da Costa, Daniel Alencar
    Lo, David
    Hassan, Ahmed E.
    Li, Shanping
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (08) : 1559 - 1586
  • [4] Enhancing Just-in-Time Defect Prediction Using Change Request-based Metrics
    Tessema, Hailemelekot Demtse
    Abebe, Surafel Lemma
    2021 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER 2021), 2021, : 511 - 515
  • [5] Just-in-time defect prediction for software hunks
    Zhu, Xiaoyan
    Yan, Chenyu
    Whitehead, E. James, Jr.
    Niu, Binbin
    Zhu, Lei
    Pan, Long
    SOFTWARE-PRACTICE & EXPERIENCE, 2022, 52 (01): : 130 - 153
  • [6] Feature Importance in the Context of Traditional and Just-In-Time Software Defect Prediction Models
    Haldar, Susmita
    Capretz, Luiz Fernando
    2024 IEEE CANADIAN CONFERENCE ON ELECTRICAL AND COMPUTER ENGINEERING, CCECE 2024, 2024, : 818 - 822
  • [7] Deep Learning for Just-In-Time Defect Prediction
    Yang, Xinli
    Lo, David
    Xia, Xin
    Zhang, Yun
    Sun, Jianling
    2015 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE SECURITY AND RELIABILITY (QRS 2015), 2015, : 17 - 26
  • [8] Boosting multi-objective just-in-time software defect prediction by fusing expert metrics and semantic metrics
    Chen, Xiang
    Xia, Hongling
    Pei, Wenlong
    Ni, Chao
    Liu, Ke
    JOURNAL OF SYSTEMS AND SOFTWARE, 2023, 206
  • [9] Extending Developer Experience Metrics for Better Effort-Aware Just-In-Time Defect Prediction
    Cho, Yeongjun
    Kwon, Jung-Hyun
    Yi, Jooyong
    Ko, In-Young
    IEEE ACCESS, 2022, 10 : 128218 - 128231
  • [10] Just-in-time Software Defect Prediction: Literature Review
    Cai L.
    Fan Y.-R.
    Yan M.
    Xia X.
    Ruan Jian Xue Bao/Journal of Software, 2019, 30 (05): : 1288 - 1307