Code to Comment "Translation": Data, Metrics, Baselining & Evaluation
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
Citing papers per year: 2021: 5; 2022: 9; 2023: 7; 2024: 7.
28 papers.
Sort:
By area:
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
- 2021On the Evaluation of Neural Code Summarizationcited by 47
- 2021Multilingual training for Software Engineeringcited by 43
- 2023Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Modelscited by 38
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2024Source Code Summarization in the Era of Large Language Modelscited by 30
- 2023Xpert: Empowering Incident Management with Query Recommendations via Large Language Modelscited by 22
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2023EditSum: A Retrieve-and-Edit Framework for Source Code Summarizationcited by 18
- 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
16 more
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
- 2021Impact of Evaluation Methodologies on Code Summarizationcited by 11
- 2024Studying LLM Performance on Closed- and Open-source Datacited by 11
- 2023A Prompt Learning Framework for Source Code Summarizationcited by 9
- 2024CommitBench: A Benchmark for Commit Message Generationcited by 8
- 2021Code to Comment Translation: A Comparative Study on Model Effectiveness & Errorscited by 6
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
- 2022Learning code summarization from a small and local datasetcited by 5
- 2022CodeExp: Explanatory Code Document Generationcited by 4
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generationcited by 4
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspectivecited by 3
- 2022Automatic Comment Generation via Multi-Pass Deliberationcited by 3
- 2023Statement-based Memory for Neural Source Code Summarizationcited by 2
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generationcited by 2
- 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognitioncited by 1
- 2024DeepCodeProbe: Towards Understanding What Models Trained on Code Learncited by 1
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generation7 Aug 2024
- 2024DeepCodeProbe: Towards Understanding What Models Trained on Code Learn11 Jul 2024
- 2024Source Code Summarization in the Era of Large Language Models9 Jul 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generation26 Mar 2024
- 2024CommitBench: A Benchmark for Commit Message Generation8 Mar 2024
- 2024Studying LLM Performance on Closed- and Open-source Data23 Feb 2024
- 2023A Prompt Learning Framework for Source Code Summarization26 Dec 2023
- 2023Xpert: Empowering Incident Management with Query Recommendations via Large Language Models19 Dec 2023
- 2023EditSum: A Retrieve-and-Edit Framework for Source Code Summarization26 Aug 2023
- 2023Statement-based Memory for Neural Source Code Summarization21 Jul 2023
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?22 May 2023
16 more
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)13 Apr 2023
- 2023Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models10 Jan 2023
- 2022CodeExp: Explanatory Code Document Generation25 Nov 2022
- 2022Automatic Comment Generation via Multi-Pass Deliberation14 Sep 2022
- 2022NatGen: Generative pre-training by "Naturalizing" source code15 Jun 2022
- 2022An Extractive-and-Abstractive Framework for Source Code Summarization15 Jun 2022
- 2022Learning code summarization from a small and local dataset2 Jun 2022
- 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognition5 Apr 2022
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languages5 Apr 2022
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspective10 Feb 2022
- 2022Assemble Foundation Models for Automatic Code Summarization13 Jan 2022
- 2021Multilingual training for Software Engineering3 Dec 2021
- 2021Impact of Evaluation Methodologies on Code Summarization22 Aug 2021
- 2021On the Evaluation of Neural Code Summarization15 Jul 2021
- 2021Code to Comment Translation: A Comparative Study on Model Effectiveness & Errors15 Jun 2021
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splitting14 Mar 2021
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
- 2021On the Evaluation of Neural Code Summarizationcited by 47
- 2021Multilingual training for Software Engineeringcited by 43
- 2023Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Modelscited by 38
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2024Source Code Summarization in the Era of Large Language Modelscited by 30
- 2023Xpert: Empowering Incident Management with Query Recommendations via Large Language Modelscited by 22
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2023EditSum: A Retrieve-and-Edit Framework for Source Code Summarizationcited by 18
- 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
12 most cited of 27 All 27 (JSON)
- 2024DeepCodeProbe: Towards Understanding What Models Trained on Code Learn11 Jul 2024
- 2024Source Code Summarization in the Era of Large Language Models9 Jul 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generation26 Mar 2024
- 2024CommitBench: A Benchmark for Commit Message Generation8 Mar 2024
- 2024Studying LLM Performance on Closed- and Open-source Data23 Feb 2024
- 2023A Prompt Learning Framework for Source Code Summarization26 Dec 2023
- 2023Xpert: Empowering Incident Management with Query Recommendations via Large Language Models19 Dec 2023
- 2023EditSum: A Retrieve-and-Edit Framework for Source Code Summarization26 Aug 2023
- 2023Statement-based Memory for Neural Source Code Summarization21 Jul 2023
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?22 May 2023
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)13 Apr 2023
12 newest of 27 All 27 (JSON)