Improved Automatic Summarization of Subroutines via Attention to File Context
arXiv:2004.04881 · doi:10.1145/3379597.3387449
Abstract
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 understood without surrounding context. In this paper, we present an approach that models the file context of subroutines (i.e. other subroutines 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.
References in corpus (5)
- Recent Trends in Deep Learning Based Natural Language Processing
- DeepCoder: Learning to Write Programs
- Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networks
- A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques
- Reinforcement Learning Based Graph-to-Sequence Model for Natural Question Generation
Cited by in corpus (14)
- On the Evaluation of Neural Code Summarization
- Multilingual training for Software Engineering
- A Multi-Perspective Architecture for Semantic Code Search
- GypSum: Learning Hybrid Representations for Code Summarization
- Towards Modeling Human Attention from Eye Movements for Neural Source Code Summarization
- HatCUP: Hybrid Analysis and Attention based Just-In-Time Comment Updating
- CoCoSum: Contextual Code Summarization with Multi-Relational Graph Neural Network
- Programmer Visual Attention During Context-Aware Code Summarization
- Code to Comment "Translation": Data, Metrics, Baselining & Evaluation
- Improving Code Summarization with Block-wise Abstract Syntax Tree Splitting
- HAConvGNN: Hierarchical Attention Based Convolutional Graph Neural Network for Code Documentation Generation in Jupyter Notebooks
- Learning to Generate Code Comments from Class Hierarchies
- A Controlled Experiment of Different Code Representations for Learning-Based Bug Repair
- Code Representation Learning with Prüfer Sequences