On the Impact of Code Comments for Automated Bug-Fixing: An Empirical Study
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) are increasingly relevant in Software Engineering research and practice, with Automated Bug Fixing (ABF) being one of their key applications. ABF involves transforming a buggy method into its fixed equivalent. A common preprocessing step in ABF involves removing comments from code prior to training. However, we hypothesize that comments may play a critical role in fixing certain types of bugs by providing valuable design and implementation insights. In this study, we investigate how the presence or absence of comments, both during training and at inference time, impacts the bug-fixing capabilities of LLMs. We conduct an empirical evaluation comparing two model families, each evaluated under all combinations of training and inference conditions (with and without comments), and thereby revisiting the common practice of removing comments during training. To address the limited availability of comments in state-of-the-art datasets, we use an LLM to automatically generate comments for methods lacking them. Our findings show that comments improve ABF accuracy by up to threefold when present in both phases, while training with comments does not degrade performance when instances lack them. Additionally, an interpretability analysis identifies that comments detailing method implementation are particularly effective in aiding LLMs to fix bugs accurately.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 45 of its 68 references that are in the map. First posted on arXiv 30 Jan 2026.
Builds on
45 of 68 references.
References · 45
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,488
- 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
33 more
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 106
- 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 85
- 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 71
- 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
- 2022Using Pre-Trained Models to Boost Code Review Automationcited by 63
- 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
- 2021Neural Program Repair with Execution-based Backpropagationcited by 50
- 2019Recommendations for Datasets for Source Code Summarizationcited by 46
- 2023Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructionscited by 46
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repaircited by 43
- 2024A Deep Dive into Large Language Models for Automated Bug Localization and Repaircited by 39
- 2020Improved Automatic Summarization of Subroutines via Attention to File Contextcited by 34
- 2023Distilled GPT for Source Code Summarizationcited by 30
- 2021On Multi-Modal Learning of Editing Source Codecited by 25
- 2021An Empirical Study on the Usage of Transformer Models for Code Completioncited by 22
- 2022Are We Building on the Rock? On the Importance of Data Preprocessing for Code Summarizationcited by 22
- 2021Generating Bug-Fixes Using Pretrained Transformerscited by 18
- 2022Using Transfer Learning for Code-Related Taskscited by 18
- 2023On the Reliability and Explainability of Language Models for Program Generationcited by 17
- 2022Using Deep Learning to Generate Complete Log Statementscited by 16
- 2023Developer-Intent Driven Code Comment Generationcited by 16
- 2021Megadiff: A Dataset of 600k Java Source Code Changes Categorized by Diff Sizecited by 10
- 2022Improving Automated Program Repair with Domain Adaptationcited by 10
- 2023Enriching Source Code with Contextual Data for Code Completion Models: An Empirical Studycited by 7
- 2022Learning to Recommend Method Names with Global Contextcited by 6
- 2023Out of Context: How important is Local Context in Neural Program Repair?cited by 5
- 2023Toward Automatically Completing GitHub Workflowscited by 3
- 2024Towards Summarizing Code Snippets Using Pre-Trained Transformerscited by 3
Built on by
Not cited yet.