paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Pre-training Code Representation with Semantic Flow Graph for Effective Bug Localization

基于语义流图预训练代码表示以实现有效缺陷定位
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 3/10 · 该论文属于代码预训练与缺陷定位(bug localization)方向,核心是设计 SFG 代码图表示与对比学习,既未涉及静态分析、形式化验证,也未涉及 LLM/Agent 驱动的程序分析,与画像关注的 PL↔AI 交叉主线仅通过“程序图表示”这一点间接相关。且其方法基于 BERT 式预训练,属于用户明确不感兴趣的目标本身为模型能力的刷新类工作。引用 39 inbox
Yali Du, Zhongxing Yu
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出语义流图SFG、SemanticCodeBERT与层次动量对比方法HMCBL,提升缺陷定位性能。

该论文针对基于BERT的缺陷定位方法存在的两个问题:源代码预训练模型未能充分捕获程序深层语义,以及对比学习中忽略大规模负样本、并在相似度估计时忽视缺陷报告与变更集之间的词汇相似性。为此,作者提出有向多标签代码图——语义流图(Semantic Flow Graph, SFG),以紧凑且充分地表示代码语义;基于SFG设计并训练SemanticCodeBERT;并提出层次动量对比缺陷定位技术(HMCBL)。评估结果表明,该方法在缺陷定位任务上取得当前最优性能。

问题
基于BERT的缺陷定位技术难以充分捕获代码深层语义,且现有对比学习未充分利用大规模负样本与词汇相似性,限制定位效果。
方法
提出有向多标签语义流图SFG表示代码语义,据此训练SemanticCodeBERT,并设计层次动量对比缺陷定位技术HMCBL。
评估
在缺陷定位任务上进行实验评估,结果显示该方法达到当前最优性能。
原文摘要(Abstract)

Enlightened by the big success of pre-training in natural language processing, pre-trained models for programming languages have been widely used to promote code intelligence in recent years. In particular, BERT has been used for bug localization tasks and impressive results have been obtained. However, these BERT-based bug localization techniques suffer from two issues. First, the pre-trained BERT model on source code does not adequately capture the deep semantics of program code. Second, the overall bug localization models neglect the necessity of large-scale negative samples in contrastive learning for representations of changesets and ignore the lexical similarity between bug reports and changesets during similarity estimation. We address these two issues by 1) proposing a novel directed, multiple-label code graph representation named Semantic Flow Graph (SFG), which compactly and adequately captures code semantics, 2) designing and training SemanticCodeBERT based on SFG, and 3) designing a novel Hierarchical Momentum Contrastive Bug Localization technique (HMCBL). Evaluation results show that our method achieves state-of-the-art performance in bug localization.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{0008Y23,
  title = {Pre-training Code Representation with Semantic Flow Graph for Effective Bug Localization},
  author = {Yali Du and Zhongxing Yu},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616338}
}