The Source Code Comment Generation Based on Deep Reinforcement Learning and Hierarchical Attention

Daoyang Ming,Weicheng Xiong
DOI: https://doi.org/10.54097/ajst.v8i1.13993
2023-11-21
Academic Journal of Science and Technology
Abstract:Code summarization provides the main aim described in natural language of the given function, it can benefit many tasks in software engineering. Due to the special grammar and syntax structure of programming languages and various shortcomings of different deep neural networks, the accuracy of existing code summarization approaches is not good enough. This work proposes to adopt the hierarchical attention mechanism to enable the code summarization framework to translate three representations of source code to the hidden spce and then it injects them into a deep reinforcement learning model to enhance the performance of code summarization. We conduct a few of experiments, and the results of which prove that the proposed approaches can obtain better accuracy compared with the baseline approaches.
What problem does this paper attempt to address?