mlsanityData to 7 Oct 2026

Code to Comment "Translation": Data, Metrics, Baselining & Evaluation

arXiv 2010.01410 ↗First posted 3 Oct 2020cs.SE cs.CLcited by 28

Not on the map. Why?

Abstract (arXiv)

The relationship of comments to code, and in particular, the task of generating useful comments given the code, has long been of interest. The earliest approaches have been based on strong syntactic theories of comment-structures, and relied on textual templates. More recently, researchers have applied deep learning methods to this task, and specifically, trainable generative translation models which are known to work very well for Natural Language translation (e.g., from German to English). We carefully examine the underlying assumption here: that the task of generating comments sufficiently resembles the task of translating between natural languages, and so similar models and evaluation metrics could be used. We analyze several recent code-comment datasets for this task: CodeNN, DeepCom, FunCom, and DocString. We compare them with WMT19, a standard dataset frequently used to train state of the art natural language translators. We found some interesting differences between the code-comment data and the WMT19 natural language data. Next, we describe and conduct some studies to calibrate BLEU (which is commonly used as a measure of comment quality). using "affinity pairs" of methods, from different projects, in the same project, in the same class, etc; Our study suggests that the current performance on some datasets might need to be improved substantially. We also argue that fairly naive information retrieval (IR) methods do well enough at this task to be considered a reasonable baseline. Finally, we make some suggestions on how our findings might be used in future research in this area.

Key facts. Cited by 28 papers in the map (data through 7 Oct 2026). First posted on arXiv 3 Oct 2020.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2021: 5; 2022: 9; 2023: 7; 2024: 7.

28 papers.

Sort:

By area:

  1. 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
  2. 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
  3. 2021On the Evaluation of Neural Code Summarizationcited by 47
  4. 2021Multilingual training for Software Engineeringcited by 43
  5. 2023Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Modelscited by 38
  6. 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
  7. 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
  8. 2024Source Code Summarization in the Era of Large Language Modelscited by 30
  9. 2023Xpert: Empowering Incident Management with Query Recommendations via Large Language Modelscited by 22
  10. 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
  11. 2023EditSum: A Retrieve-and-Edit Framework for Source Code Summarizationcited by 18
  12. 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
16 more
  1. 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
  2. 2021Impact of Evaluation Methodologies on Code Summarizationcited by 11
  3. 2024Studying LLM Performance on Closed- and Open-source Datacited by 11
  4. 2023A Prompt Learning Framework for Source Code Summarizationcited by 9
  5. 2024CommitBench: A Benchmark for Commit Message Generationcited by 8
  6. 2021Code to Comment Translation: A Comparative Study on Model Effectiveness & Errorscited by 6
  7. 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
  8. 2022Learning code summarization from a small and local datasetcited by 5
  9. 2022CodeExp: Explanatory Code Document Generationcited by 4
  10. 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generationcited by 4
  11. 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspectivecited by 3
  12. 2022Automatic Comment Generation via Multi-Pass Deliberationcited by 3
  13. 2023Statement-based Memory for Neural Source Code Summarizationcited by 2
  14. 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generationcited by 2
  15. 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognitioncited by 1
  16. 2024DeepCodeProbe: Towards Understanding What Models Trained on Code Learncited by 1