Leveraging an Enhanced CodeBERT-Based Model for Multiclass Software Defect Prediction via Defect Classification
Open Access
- 2 January 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 13, 24383-24397
Abstract
Ensuring software reliability through early-stage defect prevention and prediction is crucial, particularly as software systems become increasingly complex. Automated testing has emerged as the most practical approach to achieving bug-free and efficient code. In this context, machine learning-driven methods, especially those leveraging natural language models, have gained significant traction for developing effective techniques. This paper introduces a novel framework for automating software defect prediction, focusing on eight specific defects: SIGFPE, NZEC, LOGICAL, SYNTAX, SIGSEGV, SIGABRT, SEMANTIC, and LINKER. Our research involves a specialized dataset comprising nine classes, including eight common programming errors and one error-free class. The goal is to enhance software testing and development processes by identifying defects within code snippets. The proposed framework utilizes a CodeBERT-based algorithm for defect prediction, optimizing model hyperparameters to achieve superior accuracy. Comparative analysis against established models such as RoBERTa, Microsoft CodeBERT, and GPT-2 demonstrates that our approach yields significant improvements in prediction performance, with accuracy gains of up to 20% and 7% respectively in binary and multi class experimentation. Empirical studies validate the effectiveness of neural language models like CodeBERT for software defect prediction, highlighting substantial advancements in software testing and development techniques. These findings underscore the potential benefits of incorporating advanced machine learning models into the software development lifecycle.Keywords
Funding Information
- Natural Sciences and Engineering Research Council of Canada (DDG-2024-00035)
- Cette recherche a été financée par le Conseil de recherches en sciences naturelles et en génie du Canada (DDG-2024-00035)
This publication has 35 references indexed in Scilit:
- Software defect prediction: future directions and challengesAutomated Software Engineering, 2024
- Machine learning in software defect prediction: A business-driven systematic mapping studyInformation and Software Technology, 2022
- WINE: Warning miner for improving bug findersInformation and Software Technology, 2022
- DouBiGRU-A: Software defect detection algorithm based on attention mechanism and double BiGRUComputers & Security, 2021
- I-MAD: Interpretable malware detector using Galaxy TransformerComputers & Security, 2021
- Principal component based support vector machine (PC-SVM): a hybrid technique for software defect detectionCluster Computing, 2021
- PathPair2Vec: An AST path pair-based code representation method for defect predictionJournal of Computer Languages, 2020
- Malware classification algorithm using advanced Word2vec-based Bi-LSTM for ground control stationsComputer Communications, 2020
- Improving defect prediction with deep forestInformation and Software Technology, 2019
- Software defect number prediction: Unsupervised vs supervised methodsInformation and Software Technology, 2019