Autofolding for Source Code Summarization

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 manua...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:arXiv.org 2017-03
Hauptverfasser: Fowkes, Jaroslav, Chanthirasegaran, Pankajan, Ranca, Razvan, Allamanis, Miltiadis, Lapata, Mirella, Sutton, Charles
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title arXiv.org
container_volume
creator Fowkes, Jaroslav
Chanthirasegaran, Pankajan
Ranca, Razvan
Allamanis, Miltiadis
Lapata, Mirella
Sutton, Charles
description 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.
doi_str_mv 10.48550/arxiv.1403.4503
format Article
fullrecord <record><control><sourceid>proquest_arxiv</sourceid><recordid>TN_cdi_arxiv_primary_1403_4503</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2075385049</sourcerecordid><originalsourceid>FETCH-LOGICAL-a519-82b1d214b1eeac3c11b398546e95ae6c8a1846bcc69ea15e05d005653afb72493</originalsourceid><addsrcrecordid>eNotjz1rwzAURUWh0JBm7xQMnTrYfU_Sk-UxmH5BoEOyG1mWg0NipbJd2v76Kk2nuxwu5zB2h5BJTQSPJnx1nxlKEJkkEFdsxoXAVEvOb9hiGPYAwFXOicSMPaym0bf-0HT9Lml9SDZ-CtYlpW9cspmORxO6HzN2vr9l1605DG7xv3O2fX7alq_p-v3lrVytU0NYpJrX2HCUNTpnrLCItSg0SeUKMk5ZbVBLVVurCmeQHFADQIqEaeucy0LM2fJy-5dRnUIXFb6rc051zonA_QU4Bf8xuWGs9lG5j0oVh5yEJog3v8MhS7E</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>2075385049</pqid></control><display><type>article</type><title>Autofolding for Source Code Summarization</title><source>arXiv.org</source><source>Free E- Journals</source><creator>Fowkes, Jaroslav ; Chanthirasegaran, Pankajan ; Ranca, Razvan ; Allamanis, Miltiadis ; Lapata, Mirella ; Sutton, Charles</creator><creatorcontrib>Fowkes, Jaroslav ; Chanthirasegaran, Pankajan ; Ranca, Razvan ; Allamanis, Miltiadis ; Lapata, Mirella ; Sutton, Charles</creatorcontrib><description>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.</description><identifier>EISSN: 2331-8422</identifier><identifier>DOI: 10.48550/arxiv.1403.4503</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Browsing ; Computer Science - Software Engineering ; Decisions ; Error reduction ; Folding ; Source code</subject><ispartof>arXiv.org, 2017-03</ispartof><rights>2017. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><rights>http://arxiv.org/licenses/nonexclusive-distrib/1.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,780,784,885,27924</link.rule.ids><backlink>$$Uhttps://doi.org/10.48550/arXiv.1403.4503$$DView paper in arXiv$$Hfree_for_read</backlink><backlink>$$Uhttps://doi.org/10.1109/TSE.2017.2664836$$DView published paper (Access to full text may be restricted)$$Hfree_for_read</backlink></links><search><creatorcontrib>Fowkes, Jaroslav</creatorcontrib><creatorcontrib>Chanthirasegaran, Pankajan</creatorcontrib><creatorcontrib>Ranca, Razvan</creatorcontrib><creatorcontrib>Allamanis, Miltiadis</creatorcontrib><creatorcontrib>Lapata, Mirella</creatorcontrib><creatorcontrib>Sutton, Charles</creatorcontrib><title>Autofolding for Source Code Summarization</title><title>arXiv.org</title><description>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.</description><subject>Browsing</subject><subject>Computer Science - Software Engineering</subject><subject>Decisions</subject><subject>Error reduction</subject><subject>Folding</subject><subject>Source code</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2017</creationdate><recordtype>article</recordtype><sourceid>ABUWG</sourceid><sourceid>AFKRA</sourceid><sourceid>AZQEC</sourceid><sourceid>BENPR</sourceid><sourceid>CCPQU</sourceid><sourceid>DWQXO</sourceid><sourceid>GOX</sourceid><recordid>eNotjz1rwzAURUWh0JBm7xQMnTrYfU_Sk-UxmH5BoEOyG1mWg0NipbJd2v76Kk2nuxwu5zB2h5BJTQSPJnx1nxlKEJkkEFdsxoXAVEvOb9hiGPYAwFXOicSMPaym0bf-0HT9Lml9SDZ-CtYlpW9cspmORxO6HzN2vr9l1605DG7xv3O2fX7alq_p-v3lrVytU0NYpJrX2HCUNTpnrLCItSg0SeUKMk5ZbVBLVVurCmeQHFADQIqEaeucy0LM2fJy-5dRnUIXFb6rc051zonA_QU4Bf8xuWGs9lG5j0oVh5yEJog3v8MhS7E</recordid><startdate>20170306</startdate><enddate>20170306</enddate><creator>Fowkes, Jaroslav</creator><creator>Chanthirasegaran, Pankajan</creator><creator>Ranca, Razvan</creator><creator>Allamanis, Miltiadis</creator><creator>Lapata, Mirella</creator><creator>Sutton, Charles</creator><general>Cornell University Library, arXiv.org</general><scope>8FE</scope><scope>8FG</scope><scope>ABJCF</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>HCIFZ</scope><scope>L6V</scope><scope>M7S</scope><scope>PIMPY</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope><scope>PTHSS</scope><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20170306</creationdate><title>Autofolding for Source Code Summarization</title><author>Fowkes, Jaroslav ; Chanthirasegaran, Pankajan ; Ranca, Razvan ; Allamanis, Miltiadis ; Lapata, Mirella ; Sutton, Charles</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a519-82b1d214b1eeac3c11b398546e95ae6c8a1846bcc69ea15e05d005653afb72493</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2017</creationdate><topic>Browsing</topic><topic>Computer Science - Software Engineering</topic><topic>Decisions</topic><topic>Error reduction</topic><topic>Folding</topic><topic>Source code</topic><toplevel>online_resources</toplevel><creatorcontrib>Fowkes, Jaroslav</creatorcontrib><creatorcontrib>Chanthirasegaran, Pankajan</creatorcontrib><creatorcontrib>Ranca, Razvan</creatorcontrib><creatorcontrib>Allamanis, Miltiadis</creatorcontrib><creatorcontrib>Lapata, Mirella</creatorcontrib><creatorcontrib>Sutton, Charles</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science &amp; Engineering Collection</collection><collection>ProQuest Central (Alumni Edition)</collection><collection>ProQuest Central UK/Ireland</collection><collection>ProQuest Central Essentials</collection><collection>ProQuest Central</collection><collection>Technology Collection</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central Korea</collection><collection>SciTech Premium Collection</collection><collection>ProQuest Engineering Collection</collection><collection>Engineering Database</collection><collection>Publicly Available Content Database</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central China</collection><collection>Engineering Collection</collection><collection>arXiv Computer Science</collection><collection>arXiv.org</collection><jtitle>arXiv.org</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Fowkes, Jaroslav</au><au>Chanthirasegaran, Pankajan</au><au>Ranca, Razvan</au><au>Allamanis, Miltiadis</au><au>Lapata, Mirella</au><au>Sutton, Charles</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Autofolding for Source Code Summarization</atitle><jtitle>arXiv.org</jtitle><date>2017-03-06</date><risdate>2017</risdate><eissn>2331-8422</eissn><abstract>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.</abstract><cop>Ithaca</cop><pub>Cornell University Library, arXiv.org</pub><doi>10.48550/arxiv.1403.4503</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier EISSN: 2331-8422
ispartof arXiv.org, 2017-03
issn 2331-8422
language eng
recordid cdi_arxiv_primary_1403_4503
source arXiv.org; Free E- Journals
subjects Browsing
Computer Science - Software Engineering
Decisions
Error reduction
Folding
Source code
title Autofolding for Source Code Summarization
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-12T16%3A27%3A35IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_arxiv&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Autofolding%20for%20Source%20Code%20Summarization&rft.jtitle=arXiv.org&rft.au=Fowkes,%20Jaroslav&rft.date=2017-03-06&rft.eissn=2331-8422&rft_id=info:doi/10.48550/arxiv.1403.4503&rft_dat=%3Cproquest_arxiv%3E2075385049%3C/proquest_arxiv%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=2075385049&rft_id=info:pmid/&rfr_iscdi=true