Improved Automatic Summarization of Subroutines via Attention to File Context
Improved Automatic Summarization of Subroutines via Attention to File Context
复制标题
DOI:
10.1145/3379597.3387449
复制
发表时间:
2020-04
期刊:
影响因子:
--
通讯作者:
S. Haque;Alexander LeClair;Lingfei Wu;Collin McMillan
中科院分区:
文献类型:
--
作者:
S. Haque;Alexander LeClair;Lingfei Wu;Collin McMillan
Software documentation largely consists of short, natural language summaries of the subroutines in the software. These summaries help programmers quickly understand what a subroutine does without having to read the source code him or herself. The task of writing these descriptions is called “source code summarization” and has been a target of research for several years. Recently, AI-based approaches have superseded older, heuristic-based approaches. Yet, to date these AI-based approaches assume that all the content needed to predict summaries is inside subroutine itself. This assumption limits performance because many subroutines cannot be under-stood without surrounding context. In this paper, we present an approach that models the file context of subroutines (i.e. other sub-routines in the same file) and uses an attention mechanism to find words and concepts to use in summaries. We show in an experiment that our approach extends and improves several recent baselines.