Paper
6 May 2024 A multi-encoder model for automatic code comment generation
Jian Qiu, Shenglin Li
Author Affiliations +
Proceedings Volume 13107, Fourth International Conference on Sensors and Information Technology (ICSI 2024); 131070C (2024) https://doi.org/10.1117/12.3029299
Event: Fourth International Conference on Sensors and Information Technology (ICSI 2024), 2024, Xiamen, China
Abstract
Automatic code comment generation is an important research topic in software engineering, which aims to help developers understand the source code. However, this task is challenging due to the issues of long dependencies, source code structure information, and out-of-vocabulary (OOV) words. In this paper, we propose HCCM, a novel neural network model that uses three encoders to generate natural language comments for Java methods. The proposed model incorporates three novel techniques: (1) the S-SBT method to encode the abstract syntax tree of the source code; (2) a pointer generation network to copy OOV words from the source code; and (3) a convolutional neural network to capture local features of the source code tokens. We evaluate our model on a state-of-the-art large-scale Java dataset and show that it outperforms the existing methods on several metrics such as BLEU, METEOR, and ROUGE.
(2024) Published by SPIE. Downloading of the abstract is permitted for personal use only.
Jian Qiu and Shenglin Li "A multi-encoder model for automatic code comment generation", Proc. SPIE 13107, Fourth International Conference on Sensors and Information Technology (ICSI 2024), 131070C (6 May 2024); https://doi.org/10.1117/12.3029299
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Java

Education and training

Neural networks

Semantics

Data modeling

Design

Performance modeling

Back to Top