Source Code Summarization in the Era of Large Language Models
Not on the map. Why?
Abstract (arXiv)
To support software developers in understanding and maintaining programs, various automatic (source) code summarization techniques have been proposed to generate a concise natural language summary (i.e., comment) for a given code snippet. Recently, the emergence of large language models (LLMs) has led to a great boost in the performance of code-related tasks. In this paper, we undertake a systematic and comprehensive study on code summarization in the era of LLMs, which covers multiple aspects involved in the workflow of LLM-based code summarization. Specifically, we begin by examining prevalent automated evaluation methods for assessing the quality of summaries generated by LLMs and find that the results of the GPT-4 evaluation method are most closely aligned with human evaluation. Then, we explore the effectiveness of five prompting techniques (zero-shot, few-shot, chain-of-thought, critique, and expert) in adapting LLMs to code summarization tasks. Contrary to expectations, advanced prompting techniques may not outperform simple zero-shot prompting. Next, we investigate the impact of LLMs' model settings (including topp and temperature parameters) on the quality of generated summaries. We find the impact of the two parameters on summary quality varies by the base LLM and programming language, but their impacts are similar. Moreover, we canvass LLMs' abilities to summarize code snippets in distinct types of programming languages. The results reveal that LLMs perform suboptimally when summarizing code written in logic programming languages compared to other language types. Finally, we unexpectedly find that CodeLlama-Instruct with 7B parameters can outperform advanced GPT-4 in generating summaries describing code implementation details and asserting code properties. We hope that our findings can provide a comprehensive understanding of code summarization in the era of LLMs.
Key facts. Cited by 30 papers in the map (data through 7 Oct 2026). Builds on 50 of its 85 references that are in the map. First posted on arXiv 9 Jul 2024.
Builds on
50 of 85 references.
References · 50
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2023G-Eval: NLG Evaluation using GPT-4 with Better Human Alignmentcited by 2,205
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
38 more
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2023Is ChatGPT a General-Purpose Natural Language Processing Task Solver?cited by 486
- 2018Universal Sentence Encodercited by 485
- 2023Is ChatGPT a Good NLG Evaluator? A Preliminary Studycited by 420
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2023Language Models can Solve Computer Taskscited by 371
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 178
- 2023ExpertPrompting: Instructing Large Language Models to be Distinguished Expertscited by 140
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2022Shortcut Learning of Large Language Models in Natural Language Understandingcited by 83
- 2023Element-aware Summarization with Large Language Models: Expert-aligned Evaluation and Chain-of-Thought Methodcited by 76
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 71
- 2023A Survey on Large Language Models for Software Engineeringcited by 58
- 2021On the Evaluation of Neural Code Summarizationcited by 47
- 2023What Makes Good In-context Demonstrations for Code Intelligence Tasks with LLMs?cited by 47
- 2024Large Language Model for Vulnerability Detection: Emerging Results and Future Directionscited by 44
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2024A Systematic Literature Review on Large Language Models for Automated Program Repaircited by 37
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2023Distilled GPT for Source Code Summarizationcited by 30
- 2024Teaching Code LLMs to Use Autocompletion Tools in Repository-Level Code Generationcited by 30
- 2020Code Summarization with Structure-induced Transformercited by 29
- 2023A Critical Review of Large Language Model on Software Engineering: An Example from ChatGPT and Automated Program Repaircited by 29
- 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 28
- 2023Disinformation Capabilities of Large Language Modelscited by 23
- 2023Evaluating Code Summarization Techniques: A New Metric and an Empirical Characterizationcited by 21
- 2023Developer-Intent Driven Code Comment Generationcited by 16
- 2023One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarizationcited by 16
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
- 2023A Prompt Learning Framework for Source Code Summarizationcited by 9
- 2024Learning in the Wild: Towards Leveraging Unlabeled Data for Effectively Tuning Pre-trained Code Modelscited by 9
- 2024Evaluating Large Language Models for Line-Level Vulnerability Localizationcited by 7
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
Built on by
Citing papers per year: 2024: 5; 2025: 13; 2026: 12.
30 papers.
Sort:
By area:
- 2024Code Comprehension then Auditing for Unsupervised LLM Evaluationcited by 31
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasetscited by 15
- 2024Natural Language Outlines for Code: Literate Programming in the LLM Eracited by 9
- 2025Positional Biases Shift as Inputs Approach Context Window Limitscited by 9
- 2024CursorCore: Assist Programming through Aligning Anythingcited by 6
- 2025Meta-RAG on Large Codebases Using Code Summarizationcited by 4
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Frameworkcited by 4
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERTcited by 3
- 2025Requirements Development and Formalization for Reliable Code Generation: A Multi-Agent Visioncited by 3
- 2025Reverse Engineering User Stories from Code using Large Language Modelscited by 2
- 2026An Exploratory Study on LLM-Generated Code and Comments in Code Repositoriescited by 2
- 2025Secure Resource Allocation via Constrained Deep Reinforcement Learningcited by 1
18 more
- 2025Can Large Language Models Understand Intermediate Representations in Compilers?cited by 1
- 2025Investigating Execution-Aware Language Models for Code Optimizationcited by 1
- 2026ArchAgent: Scalable Legacy Software Architecture Recovery with LLMscited by 1
- 2026Rethinking Code Review in the Age of AI: A Vision for Agentic Code Reviewcited by 1
- 2026DeepDiscovery: A Location-Inference Framework for Task-Level Repository Understandingcited by 1
- 2026Automated Summarization of Software Documents: An LLM-based Multi-Agent Approachcited by 1
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embeddingcited by 0
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generationcited by 0
- 2025Knowledge-Guided Multi-Agent Framework for Automated Requirements Development: A Visioncited by 0
- 2025On the Difficulty of Selecting Few-Shot Examples for Effective LLM-based Vulnerability Detectioncited by 0
- 2025Assertion-Aware Test Code Summarization with Large Language Modelscited by 0
- 2026BatCoder: Self-Supervised Bidirectional Code-Documentation Learning via Back-Translationcited by 0
- 2026Precision in Practice: Knowledge Guided Code Summarizing Grounded in Industrial Expectationscited by 0
- 2026Prompt-Driven Code Summarization: A Systematic Literature Reviewcited by 0
- 2026A Metamorphic Testing Approach to Diagnosing Memorization in LLM-Based Program Repaircited by 0
- 2026ROSUM-MCTS: Monte Carlo Tree Search-Inspired HDL Code Summarization with Structural Rewardscited by 0
- 2026CoSTAR: Data Synthesis-Driven Constraint-Aware COBOL Section Summarization for Legacy System Modernizationcited by 0
- 2026Complexity-Aware Evaluation of LLM Comprehensioncited by 0
- 2026Complexity-Aware Evaluation of LLM Comprehension29 Sep 2026
- 2026CoSTAR: Data Synthesis-Driven Constraint-Aware COBOL Section Summarization for Legacy System Modernization10 Sep 2026
- 2026An Exploratory Study on LLM-Generated Code and Comments in Code Repositories2 Jul 2026
- 2026Automated Summarization of Software Documents: An LLM-based Multi-Agent Approach23 Jun 2026
- 2026DeepDiscovery: A Location-Inference Framework for Task-Level Repository Understanding22 Jun 2026
- 2026ROSUM-MCTS: Monte Carlo Tree Search-Inspired HDL Code Summarization with Structural Rewards6 Jun 2026
- 2026Rethinking Code Review in the Age of AI: A Vision for Agentic Code Review17 May 2026
- 2026A Metamorphic Testing Approach to Diagnosing Memorization in LLM-Based Program Repair23 Apr 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026Precision in Practice: Knowledge Guided Code Summarizing Grounded in Industrial Expectations3 Feb 2026
- 2026BatCoder: Self-Supervised Bidirectional Code-Documentation Learning via Back-Translation30 Jan 2026
- 2026ArchAgent: Scalable Legacy Software Architecture Recovery with LLMs19 Jan 2026
18 more
- 2025Assertion-Aware Test Code Summarization with Large Language Models9 Nov 2025
- 2025On the Difficulty of Selecting Few-Shot Examples for Effective LLM-based Vulnerability Detection31 Oct 2025
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Framework3 Oct 2025
- 2025Reverse Engineering User Stories from Code using Large Language Models23 Sep 2025
- 2025Requirements Development and Formalization for Reliable Code Generation: A Multi-Agent Vision26 Aug 2025
- 2025Positional Biases Shift as Inputs Approach Context Window Limits10 Aug 2025
- 2025Meta-RAG on Large Codebases Using Code Summarization4 Aug 2025
- 2025Knowledge-Guided Multi-Agent Framework for Automated Requirements Development: A Vision27 Jun 2025
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation17 Jun 2025
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasets21 Mar 2025
- 2025Investigating Execution-Aware Language Models for Code Optimization11 Mar 2025
- 2025Can Large Language Models Understand Intermediate Representations in Compilers?7 Feb 2025
- 2025Secure Resource Allocation via Constrained Deep Reinforcement Learning20 Jan 2025
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERT18 Dec 2024
- 2024CursorCore: Assist Programming through Aligning Anything9 Oct 2024
- 2024Code Comprehension then Auditing for Unsupervised LLM Evaluation4 Oct 2024
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embedding23 Sep 2024
- 2024Natural Language Outlines for Code: Literate Programming in the LLM Era9 Aug 2024
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Frameworkcited by 4
- 2025Requirements Development and Formalization for Reliable Code Generation: A Multi-Agent Visioncited by 3
- 2026Rethinking Code Review in the Age of AI: A Vision for Agentic Code Reviewcited by 1
- 2026Automated Summarization of Software Documents: An LLM-based Multi-Agent Approachcited by 1
- 2025Knowledge-Guided Multi-Agent Framework for Automated Requirements Development: A Visioncited by 0
- 2026Automated Summarization of Software Documents: An LLM-based Multi-Agent Approach23 Jun 2026
- 2026Rethinking Code Review in the Age of AI: A Vision for Agentic Code Review17 May 2026
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Framework3 Oct 2025
- 2025Requirements Development and Formalization for Reliable Code Generation: A Multi-Agent Vision26 Aug 2025
- 2025Knowledge-Guided Multi-Agent Framework for Automated Requirements Development: A Vision27 Jun 2025
- 2024Code Comprehension then Auditing for Unsupervised LLM Evaluationcited by 31
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasetscited by 15
- 2024Natural Language Outlines for Code: Literate Programming in the LLM Eracited by 9
- 2025Positional Biases Shift as Inputs Approach Context Window Limitscited by 9
- 2024CursorCore: Assist Programming through Aligning Anythingcited by 6
- 2025Meta-RAG on Large Codebases Using Code Summarizationcited by 4
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERTcited by 3
- 2025Reverse Engineering User Stories from Code using Large Language Modelscited by 2
- 2026An Exploratory Study on LLM-Generated Code and Comments in Code Repositoriescited by 2
- 2025Secure Resource Allocation via Constrained Deep Reinforcement Learningcited by 1
- 2025Can Large Language Models Understand Intermediate Representations in Compilers?cited by 1
- 2025Investigating Execution-Aware Language Models for Code Optimizationcited by 1
12 most cited of 23 All 23 (JSON)
- 2026Complexity-Aware Evaluation of LLM Comprehension29 Sep 2026
- 2026An Exploratory Study on LLM-Generated Code and Comments in Code Repositories2 Jul 2026
- 2026DeepDiscovery: A Location-Inference Framework for Task-Level Repository Understanding22 Jun 2026
- 2026ROSUM-MCTS: Monte Carlo Tree Search-Inspired HDL Code Summarization with Structural Rewards6 Jun 2026
- 2026A Metamorphic Testing Approach to Diagnosing Memorization in LLM-Based Program Repair23 Apr 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026Precision in Practice: Knowledge Guided Code Summarizing Grounded in Industrial Expectations3 Feb 2026
- 2026BatCoder: Self-Supervised Bidirectional Code-Documentation Learning via Back-Translation30 Jan 2026
- 2026ArchAgent: Scalable Legacy Software Architecture Recovery with LLMs19 Jan 2026
- 2025Assertion-Aware Test Code Summarization with Large Language Models9 Nov 2025
- 2025On the Difficulty of Selecting Few-Shot Examples for Effective LLM-based Vulnerability Detection31 Oct 2025
- 2025Reverse Engineering User Stories from Code using Large Language Models23 Sep 2025
12 newest of 23 All 23 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2024Can Large Language Models Serve as Evaluators for Code Summarization?
- 2025Code Summarization Beyond Function Level
- 2024The Impact of Prompt Programming on Function-Level Code Generation
- 2024A RAG Method for Source Code Inquiry Tailored to Long-Context LLMs
- 2026AdaptEval: A Benchmark for Evaluating Large Language Models on Code Snippet Adaptation
- 2023Little Giants: Exploring the Potential of Small LLMs as Evaluation Metrics in Summarization in the Eval4NLP 2023 Shared Task
- 2026Measuring and Mitigating Bias in Code Generated by Large Language Models
- 2025Code Semantic Zooming ↗