CSTLineDP: A Fine-grained Software Defect Prediction Framework Based on CST and Bi-GRU
Xiangkang Li, Cheng Zhang · 2024
Software defect detection based on deep learning technology is an important research field. However, there are still obvious limitations in the existing research: (1) most of the current research is coarse-grained, and code defects can only be located at the coarse-grained level, such as function level and file level; (2) existing methods rely more on the code text, ignoring the use of code structure information, resulting in low predict accuracy. (3) the risk score of each code token cannot be obtained, resulting in insufficient interpretability of the prediction results. Aiming at the shortcomings of previous studies, we propose CSTLineDP, which combines the hierarchical structure information of the code (based on the concrete syntax tree) with the text information to achieve fine-grained and interpretable code defect prediction. Experimental results on the public Java and C/C++ datasets indicate that, compared with other baseline methods, our method improves the three evaluation indicators by 8.8% ~ 32.2%, 1.5% ~ 16.0% and 13 ~ 27, respectively.