arrow
Return

Autofolding for Source Code Summarization

delete2017-12-01
delete37
delete
OA
AI
J
Jaroslav Fowkes *
P
Pankajan Chanthirasegaran
R
Razvan Ranca
M
Miltiadis Allamanis
M
Mirella Lapata
C
Charles Sutton
DOI:10.1109/TSE.2017.2664836delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
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 percent 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.
Keywords:
Source code summarization
program comprehension
topic modelling
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.8K
Citations:
1.1W

Organization

U
University of Edinburgh
Scholars:
5.1W
Papers: 4.6W
Citations: 71