arrow
Return

Cost-adaptive multi-level semantic feature learning for source code based bug severity prediction

delete2026-01-01
delete0
PRE
AI
朱晓柯 cover
朱晓柯 (Xiaoke Zhu)
Y
Yufeng Shi
X
Xiaopan Chen *
袁彩虹 (Caihong Yuan)
F
Fumin Qi
X
Xiao‐Yuan Jing
DOI:10.1016/j.scico.2026.103444delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Bug severity prediction plays a crucial role in software development by enabling timely defect management. Traditional approaches that rely on bug reports are prone to subjective bias, often leading to inaccurate severity assessments. In contrast, source code-based methods can directly learn code representations to more accurately identify potential defects. However, existing source code-based models don't make full use of the hierarchical deep semantic information, and don't pay enough attention on the intrinsic class imbalance issue. To overcome these challenges, this paper presents the Cost-Adaptive Multi-level sEmantic feature Learning (CAMEL) framework for bug severity prediction. The framework comprises three core modules: the feature extraction module, the Multi-level Semantic Information Fusion (MSIF) module, and the Cost Weight Optimization (CWO) module. Specifically, the feature extraction module leverages CodeBERT to capture multi-level semantic information from source code. The MSIF then dynamically aggregates layer-specific features from each CodeBERT layer using an LSTM combined with a hierarchical attention mechanism, thereby preserving global semantic integrity. Finally, the CWO module mitigates the influence of class imbalance issue by dynamically adjusting class weight parameters. Experiments conducted on a dataset of 3342 method-level code snippets with varying bug severity levels demonstrate that CAMEL significantly outperforms state-of-the-art methods across key metrics, including F1-Weighted, Precision, Recall, and MCC.
Keywords:
Bug severity prediction
Code representation
Cost sensitivity
Semantic information fusion

Journal

S
Science of Computer Programming
IF:
1.4
Papers:
50
Citations:
1.6K

Organization

G
guangdong university of petrochemical technology
Scholars:
467
Papers: 167
Citations: 0
H
henan university
Scholars:
2.3W
Papers: 1.3W
Citations: 20