Autofolding for Source Code Summarization
Not on the map. Why?
Abstract (arXiv)
Developers spend much of their time reading and browsing source code, raising new opportunities for summarization methods. Indeed, modern code editors provide code folding, which allows one to selectively hide blocks of code. However this is impractical to use as folding decisions must be made manually or based on simple rules. We introduce the autofolding problem, which is to automatically create a code summary by folding less informative code regions. We present a novel solution by formulating the problem as a sequence of AST folding decisions, leveraging a scoped topic model for code tokens. On an annotated set of popular open source projects, we show that our summarizer outperforms simpler baselines, yielding a 28% error reduction. Furthermore, we find through a case study that our summarizer is strongly preferred by experienced developers. More broadly, we hope this work will aid program comprehension by turning code folding into a usable and valuable tool.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). First posted on arXiv 18 Mar 2014.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 1; 2022: 1; 2023: 2; 2024: 1; 2025: 1.
6 papers.
- 2023Distilled GPT for Source Code Summarizationcited by 30
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
- 2024Natural Language Outlines for Code: Literate Programming in the LLM Eracited by 9
- 2023Reimagining Application User Interface (UI) Design using Deep Learning Methods: Challenges and Opportunitiescited by 1
- 2025Bringing Structure to Naturalness: On the Naturalness of ASTscited by 1
- 2025Bringing Structure to Naturalness: On the Naturalness of ASTs11 Apr 2025
- 2024Natural Language Outlines for Code: Literate Programming in the LLM Era9 Aug 2024
- 2023Distilled GPT for Source Code Summarization28 Aug 2023
- 2023Reimagining Application User Interface (UI) Design using Deep Learning Methods: Challenges and Opportunities23 Mar 2023
- 2022An Extractive-and-Abstractive Framework for Source Code Summarization15 Jun 2022
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splitting14 Mar 2021