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 条
  • [21] Just-in-time defect prediction for mobile applications: using shallow or deep learning?
    Raymon van Dinter
    Cagatay Catal
    Görkem Giray
    Bedir Tekinerdogan
    [J]. Software Quality Journal, 2023, 31 : 1281 - 1302
  • [22] Just-in-time defect prediction for mobile applications: using shallow or deep learning?
    van Dinter, Raymon
    Catal, Cagatay
    Giray, Goerkem
    Tekinerdogan, Bedir
    [J]. SOFTWARE QUALITY JOURNAL, 2023, 31 (04) : 1281 - 1302
  • [23] Just-in-time software defect prediction using deep temporal convolutional networks
    Ardimento, Pasquale
    Aversano, Lerina
    Bernardi, Mario Luca
    Cimitile, Marta
    Iammarino, Martina
    [J]. NEURAL COMPUTING & APPLICATIONS, 2022, 34 (05) : 3981 - 4001
  • [24] Effort-Aware semi-Supervised just-in-Time defect prediction
    Li, Weiwei
    Zhang, Wenzhou
    Jia, Xiuyi
    Huang, Zhiqiu
    [J]. INFORMATION AND SOFTWARE TECHNOLOGY, 2020, 126
  • [25] Estimating Uncertainty in Labeled Changes by SZZ Tools on Just-In-Time Defect Prediction
    Guo, Shikai
    Li, Dongmin
    Huang, Lin
    Lv, Sijia
    Chen, Rong
    Li, Hui
    Li, Xiaochen
    Jiang, He
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 33 (04)
  • [26] Bridging expert knowledge with deep learning techniques for just-in-time defect prediction
    Zhou, Xin
    Han, Donggyun
    Lo, David
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2025, 30 (01)
  • [27] How Well Just-In-Time Defect Prediction Techniques Enhance Software Reliability?
    Tian, Yuli
    Li, Ning
    Tiant, Jeff
    Zheng, Wei
    [J]. 2020 IEEE 20TH INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY, AND SECURITY (QRS 2020), 2020, : 212 - 221
  • [28] Studying just-in-time defect prediction using cross-project models
    Kamei, Yasutaka
    Fukushima, Takafumi
    McIntosh, Shane
    Yamashita, Kazuhiro
    Ubayashi, Naoyasu
    Hassan, Ahmed E.
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2016, 21 (05) : 2072 - 2106
  • [29] A Formal Explainer for Just-In-Time Defect Predictions
    Yu, Jinqiang
    Fu, Michael
    Ignatiev, Alexey
    Tantithamthavorn, Chakkrit
    Stuckey, Peter
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 33 (07)
  • [30] Are Fix-Inducing Changes a Moving Target? A Longitudinal Case Study of Just-In-Time Defect Prediction
    McIntosh, Shane
    Kamei, Yasutaka
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2018, 44 (05) : 412 - 428