- Title
- Retrieval-based neural source code summarization
- Creator
- Zhang, Jian; Wang, Xu; Zhang, Hongyu; Sun, Hailong; Liu, Xudong
- Relation
- 2020 IEEE/ACM 42nd International Conference on Software Engineering (ICSE). ICSE '20: Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering (Seoul, South Korea 27 June-19 July, 2020) p. 1385-1397
- Relation
- ARC.DP200102940 http://purl.org/au-research/grants/arc/DP200102940
- Publisher Link
- http://dx.doi.org/10.1145/3377811.3380383
- Publisher
- Association for Computing Machinery (ACM)
- Resource Type
- conference paper
- Date
- 2020
- Description
- Source code summarization aims to automatically generate concise summaries of source code in natural language texts, in order to help developers better understand and maintain source code. Traditional work generates a source code summary by utilizing information retrieval techniques, which select terms from original source code or adapt summaries of similar code snippets. Recent studies adopt Neural Machine Translation techniques and generate summaries from code snippets using encoder-decoder neural networks. The neural-based approaches prefer the high-frequency words in the corpus and have trouble with the low-frequency ones. In this paper, we propose a retrieval-based neural source code summarization approach where we enhance the neural model with the most similar code snippets retrieved from the training set. Our approach can take advantages of both neural and retrieval-based techniques. Specifically, we first train an attentional encoder-decoder model based on the code snippets and the summaries in the training set; Second, given one input code snippet for testing, we retrieve its two most similar code snippets in the training set from the aspects of syntax and semantics, respectively; Third, we encode the input and two retrieved code snippets, and predict the summary by fusing them during decoding. We conduct extensive experiments to evaluate our approach and the experimental results show that our proposed approach can improve the state-of-the-art methods.
- Subject
- source code summarization; information retrieval; deep neural network; software
- Identifier
- http://hdl.handle.net/1959.13/1462400
- Identifier
- uon:46458
- Identifier
- ISBN:9781450371216
- Language
- eng
- Reviewed
- Hits: 1078
- Visitors: 1076
- Downloads: 0
Thumbnail | File | Description | Size | Format |
---|