arrow
Return

From Bug Reports to Code Quality: A Transformer-Based Classification Approach Using CodeBERT

delete2026-08-01
delete0
delete
OA
AI
K
Kanwal Naz
I
Imran Shafi
M
M. Zakria Mehmood
A
Abdul Saboor Khan *
J
Jamil Ahmad
DOI:10.3390/computers15080486delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
Maintaining code quality during software maintenance is a persistent challenge because bug-fix activities frequently introduce new code smells, accelerating long-term technical debt. Although bug-report classification has been applied to severity prediction and developer triaging, its use for proactively distinguishing Code-Quality-Impacting Bugs (CQIBs) from Non-Code-Quality-Impacting Bugs (NQIBs) remains underexplored. This paper proposes a transformer-based classification framework that fine-tunes CodeBERT on a balanced dataset of 25,000+ bug-report segments drawn from four Apache projects (Camel, CloudStack, Geode, and HBase). We evaluate two training strategies sequential transfer learning and individual fine-tuning and compare both against the published CNN-based baselines and against BERT, RoBERTa, and DeBERTa. Under 5-fold cross-validation, individual CodeBERT fine-tuning achieves weighted-F1 scores of 0.924, 0.866, 0.858, and 0.845 on Camel, CloudStack, Geode, and HBase, respectively, for an average of 0.873. Sequential transfer learning reaches a mean accuracy of 89.8% and a peak accuracy of 92.4% on Camel. CodeBERT is the best-performing transformer in this comparison, exceeding the average weighted-F1 of BERT (0.790), RoBERTa (0.753), and DeBERTa (0.742). Rigorous preprocessing, class balancing within the training folds, and stratified evaluation contribute substantially to these results.
Keywords:
bug report classification
code quality
CodeBERT
transformer models
software maintenance
transfer learning
code smells
Smell-Aware Bug Classification
err2024-01-01
err1
errOAAI
errKhyber; Ali, Sikandar; Wahid, Fazli; Baseer, Samad; Alkhayyat, Ahmed; Al-Radaei, Akram M.
errShare
errSave
GPTSniffer: A CodeBERT-based classifier to detect source code written by ChatGPT
err2024-08-01
err7
errOAAI
errNguyen, Phuong T.; Di Rocco, Juri; Di Sipio, Claudio; Rubei, Riccardo; Di Ruscio, Davide; Di Penta, Massimiliano
errShare
errSave
On the classification of bug reports to improve bug localization
err2021-03-19
err31
PREAI
errFang, Fan; Wu, John; Li, Yanyan; Ye, Xin; Aljedaani, Wajdi; Mkaouer, Mohamed Wiem
errShare
errSave
errShare
errSave
A data-driven approach for understanding invalid bug reports: An industrial case study
err2023-12-01
err0
errOAAI
errLaiq, Muhammad; bin Ali, Nauman; Borstler, Jurgen; Engstrom, Emelie
errShare
errSave
Bug Localization Model in Source Code Using Ontologies
err2023-01-01
err0
errOAAI
errDa Silva, Alisson Solitto; Garcia, Rogerio Eduardo; Botega, Leonardo Castro
errShare
errSave

Journal

C
Computers
IF:
4.2
Papers:
1.6K
Citations:
3.9K

Organization

O
Otto von Guericke University Magdeburg
Scholars:
44
Papers: 19
Citations: 37
N
national university of sciences and technology
Scholars:
534
Papers: 242
Citations: 214
A
abdul wali khan university mardan
Scholars:
126
Papers: 60
Citations: 91
researcher View more organizations
Cited Papers

Cited Papers

Security Bug Report Usage for Software Vulnerability Research: A Systematic Mapping Study
err2021-01-01
err4
errOAAI
errBhuiyan, Farzana Ahamed; Sharif, Md Bulbul; Rahman, Akond
errShare
errSave
Software Deterioration Control Based on Issue Reports
err2021-01-01
err0
PREAI
errBushehrian,Omid; Sayari,Mohsen; Shamsinejad,Pirooz
errShare
errSave
CaPBug-A Framework for Automatic Bug Categorization and Prioritization Using NLP and Machine Learning Algorithms
err2021-01-01
err25
errOAAI
errAhmed, Hafiza Anisa; Bawany, Narmeen Zakaria; Shamsi, Jawwad Ahmed
errShare
errSave
Not all bugs are the same: Understanding, characterizing, and classifying bug types
err2019-06-01
err78
errOAAI
errCatolino, Gemma; Palomba, Fabio; Zaidman, Andy; Ferrucci, Filomena
errShare
errSave
errShare
errSave
errShare
errSave
Cross-project bug type prediction based on transfer learning
err2019-09-16
err0
PREAI
errXiaoting Du; Zenghui Zhou; Beibei Yin; Guanping Xiao
errShare
errSave
Deep Neural Network-Based Severity Prediction of Bug Reports
err2019-01-01
err57
errOAAI
errRamay, Waheed Yousuf; Umer, Qasim; Yin, Xu Cheng; Zhu, Chao; Illahi, Inam
errShare
errSave
researcher View more