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

08/24/2023
by   Yali Du, et al.
0

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.

READ FULL TEXT
research
12/02/2022

CLeBPI: Contrastive Learning for Bug Priority Inference

Automated bug priority inference can reduce the time overhead of bug tri...
research
12/05/2021

VarCLR: Variable Semantic Representation Pre-training via Contrastive Learning

Variable names are critical for conveying intended program behavior. Mac...
research
07/21/2022

BigIssue: A Realistic Bug Localization Benchmark

As machine learning tools progress, the inevitable question arises: How ...
research
03/05/2023

PyramidFlow: High-Resolution Defect Contrastive Localization using Pyramid Normalizing Flow

During industrial processing, unforeseen defects may arise in products d...
research
12/28/2021

Fast Changeset-based Bug Localization with BERT

Automatically localizing software bugs to the changesets that induced th...
research
09/08/2021

BLESER: Bug Localization Based on Enhanced Semantic Retrieval

Static bug localization techniques that locate bugs at method granularit...
research
05/10/2021

How could Neural Networks understand Programs?

Semantic understanding of programs is a fundamental problem for programm...

Please sign up or login with your details

Forgot password? Click here to reset