arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.00231cs.SEcs.AI
收藏

CodeFlowLM:基于预训练语言模型的增量即需缺陷预测与缺陷定位的探索性洞察

CodeFlowLM: Incremental Just-In-Time Defect Prediction with Pretrained Language Models and Exploratory Insights into Defect Localization

cin.ufpe.br(佛罗里达大学佩德罗斯分校计算机学院);Recife-PE – Brazil(巴西佩德罗斯)

Monique Louise Monteiro, George G. Cabral, Adriano L. I. OLiveira

AI总结:

CodeFlowLM通过增量学习提升即时软件缺陷预测性能,同时探索LLMs在缺陷定位中的潜力与局限。

摘要:

本文介绍了CodeFlowLM,一种用于即时软件缺陷预测(JIT-SDP)的增量学习框架,利用预训练语言模型(PLMs)。与传统在线学习者不同,CodeFlowLM采用持续微调来解决概念漂移、类别不平衡和验证延迟问题,而无需从头开始重新训练。我们评估了仅编码器和编码器-解码器的PLMs(特别是CodeT5+和UniXCoder)在项目内部和跨项目中的JIT-SDP场景,并将其与增量基准BORB进行比较。结果表明,CodeFlowLM在G-Mean指标上实现了高达68%的提升,证实了其在演变软件环境中的优越适应性和鲁棒性。我们进一步将分析扩展到即时缺陷定位(JIT-DL),将大型语言模型(LLMs)如GPT-5、Claude Sonnet 4.5和Gemini 2.5 Pro与基于注意力的模型进行基准测试。GPT-5在Recall@20%和Effort@20%方面表现相当,稳定性更高,尽管基于注意力的方法在细粒度排名指标(Top-k、IFA)中仍占优势。定性错误分析表明,大多数误报源于(1)人类似乎的保守偏见,(2)基于差异的提示中信息不足,(3)JIT-Defects4J数据集中潜在的标签错误。这些发现突显了LLM推理在缺陷定位中的潜力和当前的局限性。误报的比例较小。总体而言,CodeFlowLM在增量JIT-SDP领域显著推进了研究前沿,展示了在演变软件环境中的优越适应性和鲁棒性。此外,我们对LLMs在JIT-DL中的探索性分析不仅将它们的性能与已建立的基于注意力的模型进行了比较,还提供了关于当前提示基于缺陷推理局限性的关键见解。

英文摘要:

This work introduces CodeFlowLM, an incremental learning framework for Just-In-Time Software Defect Prediction (JIT-SDP) that leverages pre-trained language models (PLMs). Unlike traditional online learners, CodeFlowLM employs continual fine-tuning to address concept drift, class imbalance, and verification latency without retraining from scratch. We evaluated encoder-only and encoder-decoder PLMs (notably CodeT5+ and UniXCoder) in JIT-SDP scenarios within and between projects, comparing them with the incremental baseline BORB. The results show that CodeFlowLM achieves up to 68% G-Mean gains, confirming its superior adaptability and robustness in evolving software environments. We further extend the analysis to Just-in-Time Defect Localization (JIT-DL), benchmarking Large Language Models (LLMs) such as GPT-5, Claude Sonnet 4.5, and Gemini 2.5 Pro against attention-based models. GPT-5 delivers comparable performance for Recall@20% and Effort@20% with higher stability, although attention-based methods retain an advantage in fine-grained ranking metrics (Top-k, IFA). A qualitative error analysis reveals that most false positives arise from (1) human-like conservative bias, (2) insufficient contextual information in diff-based prompts, and (3) potential dataset mislabeling in JIT-Defects4J. These findings highlight both the promise and the current limitations of LLM reasoning in defect localization. False negatives occur in smaller proportions. Overall, CodeFlowLM significantly advances the state of the art in incremental JIT-SDP, demonstrating superior adaptability and robustness in evolving software environments. Furthermore, our exploratory analysis of LLMs in JIT-DL not only benchmarks their performance against established attention-based models but also provides critical insights into the current limitations of prompt-based defect reasoning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑