mlsanityData to 7 Oct 2026

Retrieve and Refine: Exemplar-based Neural Comment Generation

arXiv 1910.10419 ↗First posted 23 Oct 2019cs.SEcited by 36

Not on the map. Why?

Abstract (arXiv)

Code comment generation is a crucial task in the field of automatic software development. Most previous neural comment generation systems used an encoder-decoder neural network and encoded only information from source code as input. Software reuse is common in software development. However, this feature has not been introduced to existing systems. Inspired by the traditional IR-based approaches, we propose to use the existing comments of similar source code as exemplars to guide the comment generation process. Based on an open source search engine, we first retrieve a similar code and treat its comment as an exemplar. Then we applied a seq2seq neural network to conduct an exemplar-based comment generation. We evaluate our approach on a large-scale Java corpus, and experimental results demonstrate that our model significantly outperforms the state-of-the-art methods.

Key facts. Cited by 36 papers in the map (data through 7 Oct 2026). First posted on arXiv 23 Oct 2019.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 6; 2022: 10; 2023: 10; 2024: 5; 2025: 4; 2026: 1.

36 papers.

Sort:

By area:

  1. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
  2. 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
  3. 2021On the Evaluation of Neural Code Summarizationcited by 47
  4. 2021Multilingual training for Software Engineeringcited by 43
  5. 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
  6. 2021Code Structure Guided Transformer for Source Code Summarizationcited by 29
  7. 2022RACE: Retrieval-Augmented Commit Message Generationcited by 27
  8. 2023AceCoder: Utilizing Existing Code to Enhance Code Generationcited by 25
  9. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  10. 2023EditSum: A Retrieve-and-Edit Framework for Source Code Summarizationcited by 18
  11. 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
  12. 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
24 more
  1. 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
  2. 2021API2Com: On the Improvement of Automatically Generated Code Comments Using API Documentationscited by 10
  3. 2022BashExplainer: Retrieval-Augmented Bash Code Comment Generation based on Fine-tuned CodeBERTcited by 9
  4. 2023A Prompt Learning Framework for Source Code Summarizationcited by 9
  5. 2023Expository Text Generation: Imitate, Retrieve, Paraphrasecited by 8
  6. 2024Keeping Deep Learning Models in Check: A History-Based Approach to Mitigate Overfittingcited by 6
  7. 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
  8. 2025Retrieval-Augmented Code Review Comment Generationcited by 6
  9. 2021Improving Stack Overflow question title generation with copying enhanced CodeBERT model and bi-modal informationcited by 5
  10. 2022GypSum: Learning Hybrid Representations for Code Summarizationcited by 5
  11. 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
  12. 2022A Survey of Deep Learning Models for Structural Code Understandingcited by 4
  13. 2022Automatic Comment Generation via Multi-Pass Deliberationcited by 3
  14. 2023Revisiting File Context for Source Code Summarizationcited by 3
  15. 2024The Role of Transformer Models in Advancing Blockchain Technology: A Systematic Surveycited by 3
  16. 2023APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentationcited by 2
  17. 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generationcited by 2
  18. 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognitioncited by 1
  19. 2021Borrowing from Similar Code: A Deep Learning NLP-Based Approach for Log Statement Automationcited by 0
  20. 2023Text Fact Transfercited by 0
  21. 2025AI-Mediated Code Comment Improvementcited by 0
  22. 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generationcited by 0
  23. 2025LibRec: Benchmarking Retrieval-Augmented LLMs for Library Migration Recommendationscited by 0
  24. 2026Prompt-Driven Code Summarization: A Systematic Literature Reviewcited by 0