Lune

FSE2023Top-tier venue

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

Yali Du, Zhongxing Yu

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 pretrained 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Large Language Models for Equivalent Mutant Detection: How Far Are We? cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Large Language Models for Equivalent Mutant Detection: How Far Are We? cites GraphCodeBERT: Pre-training Code Representations with Data Flow
  • ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding cites GraphCodeBERT: Pre-training Code Representations with Data Flow
  • ContraGAN: Contrastive Learning for Conditional Image Generation cites A Simple Framework for Contrastive Learning of Visual Representations
  • A Joint Learning Model with Variational Interaction for Multilingual Program Translation cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • A Joint Learning Model with Variational Interaction for Multilingual Program Translation cites GraphCodeBERT: Pre-training Code Representations with Data Flow
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Understanding Solidity Event Logging Practices in the WildLantian Li, Yejian Liang, Zhihao Liu, Zhongxing YuFSE 2023 · 13 citations
  2. Large Language Models for Equivalent Mutant Detection: How Far Are We?Zhao Tian, Honglin Shu, Dong Wang, Xuejie Cao et al.ISSTA 2024 · 12 citations
  3. A Joint Learning Model with Variational Interaction for Multilingual Program TranslationYali Du, Hui Sun, Ming LiASE 2024 · 6 citations
  4. ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation GroundingIndraneil Paul, Haoyi Yang, Goran Glavas, Kristian Kersting et al.ICLR 2025
  5. Towards Explorative IRBL: Combining Semantic Retrieval with LLM-Driven Iterative Code ExplorationMoumita Asad, Rafed Muhammad Yasir, Sam MalekISSTA 2026

Builds on22

  1. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  2. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
  3. GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng et al.ICLR 2021 · 1,644 citations
  4. ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERTOmar Khattab, Matei ZahariaSIGIR 2020 · 1,246 citations
  5. ContraGAN: Contrastive Learning for Conditional Image GenerationMinguk Kang, Jaesik ParkNeurIPS 2020 · 216 citations

Related papers

  1. Fast Changeset-based Bug Localization with BERTAgnieszka Ciborowska, Kostadin DamevskiICSE 2022 · 53 citations
  2. CONCORD: Clone-Aware Contrastive Learning for Source CodeYangruibo Ding, Saikat Chakraborty, Luca Buratti, Saurabh Pujar et al.ISSTA 2023 · 6 citations
  3. Control Flow Graph Embedding Based on Multi-Instance Decomposition for Bug LocalizationXuan Huo, Ming Li, Zhi-Hua ZhouAAAI 2020 · 46 citations
  4. CoCoSoDa: Effective Contrastive Learning for Code SearchEnsheng Shi, Yanlin Wang, Wenchao Gu, Lun Du et al.ICSE 2023 · 45 citations
  5. ContraBERT: Enhancing Code Pre-trained Models via Contrastive LearningShangqing Liu, Bozhi Wu, Xiaofei Xie, Guozhu Meng et al.ICSE 2023 · 56 citations
Dusk over the sea between two cliffs drawn in fine vertical lines