Computer Science > Software Engineering
[Submitted on 18 Mar 2014 (this version), latest version 6 Mar 2017 (v5)]
Title:Autofolding for Source Code Summarization
View PDFAbstract:We present a novel fully unsupervised method for the automatic summarization of source code text. On large projects, developers spend much of their time reading and browsing code, raising new opportunities for summarization methods. Indeed, modern code editors contain a feature called code folding, which allows one to selectively hide blocks of code. But this feature is cumbersome because currently folding decisions must be done manually.
We introduce the autofolding problem, which is to automatically create a code summary by folding non-essential code blocks. We present a novel solution to the autofolding problem by formulating it as a subtree optimization problem and making use of a comprehensive source code content model. On a set of popular open source projects from GitHub, we show that our formulation significantly outperforms simpler baselines at meeting human judgements, yielding an 84% accuracy and a 43% error reduction. More broadly, we hope that this work will aid program comprehension by turning code folding into a usable and valuable tool.
Submission history
From: Jaroslav Fowkes [view email][v1] Tue, 18 Mar 2014 15:29:08 UTC (473 KB)
[v2] Fri, 5 Sep 2014 22:06:08 UTC (361 KB)
[v3] Mon, 18 May 2015 13:14:05 UTC (109 KB)
[v4] Sat, 6 Feb 2016 15:41:34 UTC (108 KB)
[v5] Mon, 6 Mar 2017 11:10:50 UTC (633 KB)
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
Connected Papers (What is Connected Papers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.