Abstract
Code summarization is a task that is often employed by software developers for fixing code or reusing code. Software documentation is essential when it comes to software maintenance. The highest cost in software development goes to maintenance because of the difficulty of code modification. To help in reducing the cost and time spent on software development and maintenance, we introduce an automated comment summarization and commenting technique using state-of-the-art techniques in summarization. We use deep neural networks, specifically bidirectional long short-term memory (Bi-LSTM), combined with an attention model to enhance performance. In this study, we propose two different scenarios: one that uses the code text and the structure of the code represented in an abstract syntax tree (AST) and another that uses only code text. We propose two encoder-based models for the first scenario that encodes the code text and the AST independently. Previous works have used different techniques in deep neural networks to generate comments. This study’s proposed methodologies scored higher than previous works based on the gated recurrent unit encoder. We conducted our experiment on a dataset of 2.1 million pairs of Java methods and comments. Additionally, we showed that the code structure is beneficial for methods’ signatures featuring unclear words.
Subject
Fluid Flow and Transfer Processes,Computer Science Applications,Process Chemistry and Technology,General Engineering,Instrumentation,General Materials Science
Reference32 articles.
1. De Souza, S.C.B., Anquetil, N., and de Oliveira, K.M. (2005, January 21–23). A study of the documentation essential to software maintenance. Proceedings of the 23rd Annual International Conference on Design of Communication Documenting & Designing for Pervasive Information—SIGDOC’05, Coventry, UK. Available online: https://www.academia.edu/18057445/A_study_of_the_documentation_essential_to_software_maintenance.
2. Moreno, L., Aponte, J., Sridhara, G., Marcus, A., Pollock, L., and Vijay-Shanker, K. (2013, January 20–21). Automatic generation of natural language summaries for Java classes. Proceedings of the IEEE International Conference on Program Comprehension, San Francisco, CA, USA.
3. Mcburney, P.W., and Mcmillan, C. (2021, December 02). Automatic Documentation Generation via Source Code Summarization of Method Context. Available online: http://www.nd.edu/~pmcburne/summaries/.
4. Roehm, T., Tiarks, R., Koschke, R., and Maalej, W. (2012, January 2–9). How do professional developers comprehend software?. Proceedings of the International Conference on Software Engineering, Zurich, Switzerland.
5. Hellendoorn, V.J., and Devanbu, P. (2017;, January 4–8). Are deep neural networks the best choice for modeling source code?. Proceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering, Paderborn, Germany.
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献