Fine-Grained Just-In-Time Defect Prediction at the Block Level in Infrastructure-as-Code (IaC)

被引:2
|
作者
Begoug, Mahi [1 ]
Chouchen, Moataz [1 ]
Ouni, Ali [1 ]
AlOmar, Eman Abdullah [2 ]
Mkaouer, Mohamed Wiem [3 ]
机构
[1] Univ Quebec, ETS Montreal, Quebec City, PQ, Canada
[2] Stevens Inst Technol, Hoboken, NJ 07030 USA
[3] Univ Michigan, Flint, MI 48503 USA
来源
2024 IEEE/ACM 21ST INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR | 2024年
关键词
Defect Prediction; Infrastructure-as-Code; IaC; Terraform;
D O I
10.1145/3643991.3644934
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Infrastructure-as-Code (IaC) is an emerging software engineering practice that leverages source code to facilitate automated configuration of software systems' infrastructure. IaC files are typically complex, containing hundreds of lines of code and dependencies, making them prone to defects, which can result in breaking online services at scale. To help developers early identify and fix IaC defects, research efforts have introduced IaC defect prediction models at the file level. However, the granularity of the proposed approaches remains coarse-grained, requiring developers to inspect hundreds of lines of code in a file, while only a small fragment of code is defective. To alleviate this issue, we introduce a machine-learning-based approach to predict IaC defects at a fine-grained level, focusing on IaC blocks, i.e., small code units that encapsulate specific behaviours within an IaC file. We trained various machine learning algorithms based on a mixture of code, process, and change-level metrics. We evaluated our approach on 19 open-source projects that use Terraform, a widely used IaC tool. The results indicated that there is no single algorithm that consistently outperforms the others in 19 projects. Overall, among the six algorithms, we observed that the LightGBM model achieved a higher average of 0.21 in terms of MCC and 0.71 in terms of AUC. Models analysis reveals that the developer's experience and the relative number of added lines tend to be the most important features. Additionally, we found that blocks belonging to the most frequent types are more prone to defects. Our defect prediction models have also shown sensitivity to concept drift, indicating that IaC practitioners should regularly retrain their models.
引用
收藏
页码:100 / 112
页数:13
相关论文
共 50 条
  • [1] Fine-grained just-in-time defect prediction
    Pascarella, Luca
    Palomba, Fabio
    Bacchelli, Alberto
    JOURNAL OF SYSTEMS AND SOFTWARE, 2019, 150 : 22 - 36
  • [2] 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
  • [3] Just-In-Time Code Reuse: On the Effectiveness of Fine-Grained Address Space Layout Randomization
    Snow, Kevin Z.
    Monrose, Fabian
    Davi, Lucas
    Dmitrienko, Alexandra
    Liebchen, Christopher
    Sadeghi, Ahmad-Reza
    2013 IEEE SYMPOSIUM ON SECURITY AND PRIVACY (SP), 2013, : 574 - 588
  • [4] Temporal convolutional networks for just-in-time design smells prediction using fine-grained software metrics
    Ardimento, Pasquale
    Aversano, Lerina
    Bernardi, Mario Luca
    Cimitile, Marta
    Iammarino, Martina
    NEUROCOMPUTING, 2021, 463 : 454 - 471
  • [5] JITLine: A Simpler, Better, Faster, Finer-grained Just-In-Time Defect Prediction
    Pornprasit, Chanathip
    Tantithamthavorn, Chakkrit Kla
    2021 IEEE/ACM 18TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2021), 2021, : 369 - 379
  • [6] 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
  • [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] Parameter-efficient fine-tuning of pre-trained code models for just-in-time defect prediction
    Abu Talib M.
    Bou Nassif A.
    Azzeh M.
    Alesh Y.
    Afadar Y.
    Neural Computing and Applications, 36 (27) : 16911 - 16940
  • [9] Code churn: A neglected metric in effort-aware just-in-time defect prediction
    Liu, Jinping
    Zhou, Yuming
    Yang, Yibiao
    Lu, Hongmin
    Xu, Baowen
    11TH ACM/IEEE INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT (ESEM 2017), 2017, : 11 - 19
  • [10] A Fine Grained Power Management supported by Just-In-Time Compiler
    Wada, Motoki
    Sato, Mikiko
    Namiki, Mitaro
    2014 IEEE COOL CHIPS XVII, 2014,