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] Temporal Convolutional Networks for Just-in-Time Software Defect Prediction
    Ardimento, Pasquale
    Aversano, Lerina
    Bernardi, Mario
    Cimitile, Marta
    ICSOFT: PROCEEDINGS OF THE 15TH INTERNATIONAL CONFERENCE ON SOFTWARE TECHNOLOGIES, 2020, : 384 - 393
  • [22] Interpretability application of the Just-in-Time software defect prediction model
    Zheng, Wei
    Shen, Tianren
    Chen, Xiang
    Deng, Peiran
    JOURNAL OF SYSTEMS AND SOFTWARE, 2022, 188
  • [23] Deep Just-in-Time Defect Prediction: How Far Are We?
    Zeng, Zhengran
    Zhang, Yuqun
    Zhang, Haotian
    Zhang, Lingming
    ISSTA '21: PROCEEDINGS OF THE 30TH ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, 2021, : 427 - 438
  • [24] Just-in-time defect prediction based on AST change embedding
    Zhuang, Weiyuan
    Wang, Hao
    Zhang, Xiaofang
    KNOWLEDGE-BASED SYSTEMS, 2022, 248
  • [25] CfExplainer: Explainable just-in-time defect prediction based on counterfactuals
    Yang, Fengyu
    Zeng, Guangdong
    Zhong, Fa
    Xiao, Peng
    Zheng, Wei
    Qiu, Fuxing
    JOURNAL OF SYSTEMS AND SOFTWARE, 2024, 218
  • [26] Static source code metrics and static analysis warnings for fine-grained just-in-time defect prediction
    Trautsch, Alexander
    Herbold, Steffen
    Grabowski, Jens
    2020 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2020), 2020, : 127 - 138
  • [27] Effort-aware and just-in-time defect prediction with neural network
    Qiao, Lei
    Wang, Yan
    PLOS ONE, 2019, 14 (02):
  • [28] ClusterCommit: A Just-in-Time Defect Prediction Approach Using Clusters of Projects
    Shehab, Mohammed A.
    Hamou-Lhadj, Abdelwahab
    Alawneh, Luay
    2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER 2022), 2022, : 333 - 337
  • [29] A Preliminary Evaluation of CPDP Approaches on Just-in-Time Software Defect Prediction
    Amasaki, Sousuke
    Aman, Hirohisa
    Yokogawa, Tomoyuki
    2021 47TH EUROMICRO CONFERENCE ON SOFTWARE ENGINEERING AND ADVANCED APPLICATIONS (SEAA 2021), 2021, : 279 - 286
  • [30] Just-In-Time Defect Prediction on Java']JavaScript Projects: A Replication Study
    Ni, Chao
    Xia, Xin
    Lo, David
    Yang, Xiaohu
    Hassan, Ahmed E.
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2022, 31 (04)