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
期刊:
2020 IEEE/ACM 17th International Conference on Mining Software Repositories (MSR)
影响因子:
--
通讯作者:
S. Haque;Alexander LeClair;Lingfei Wu;Collin McMillan
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.