mlsanityData to 14 Oct 2026

Language Models are Better Bug Detector Through Code-Pair Classification

arXiv 2311.07957 ↗First posted 14 Nov 2023cs.SE cs.LGcited by 3

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) such as GPT-3.5 and CodeLlama are powerful models for code generation and understanding. Fine-tuning these models comes with a high computational cost and requires a large labeled dataset. Alternatively, in-context learning techniques allow models to learn downstream tasks with only a few examples. Recently, researchers have shown how in-context learning performs well in bug detection and repair. In this paper, we propose code-pair classification task in which both the buggy and non-buggy versions are given to the model, and the model identifies the buggy ones. We evaluate our task in real-world dataset of bug detection and two most powerful LLMs. Our experiments indicate that an LLM can often pick the buggy from the non-buggy version of the code, and the code-pair classification task is much easier compared to be given a snippet and deciding if and where a bug exists.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 14 of its 19 references that are in the map. First posted on arXiv 14 Nov 2023.

Builds on

14 of 19 references.

References · 14

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  4. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  5. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
  6. 2023Teaching Large Language Models to Self-Debugcited by 988
  7. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  8. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  9. 2022DocPrompting: Generating Code by Retrieving the Docscited by 153
  10. 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 72
  11. 2021Self-Supervised Bug Detection and Repaircited by 59
  12. 2023Better patching using LLM prompting, via Self-Consistencycited by 29
2 more
  1. 2023Rethinking Negative Pairs in Code Searchcited by 14
  2. 2023Learning Defect Prediction from Unrealistic Datacited by 5

Built on by

Cited by year

Citing papers per year: 2025: 3.

3 papers.