• Complex
  • Title
  • Keyword
  • Abstract
  • Scholars
  • Journal
  • ISSN
  • Conference
搜索

Author:

Wang, C. (Wang, C..) | Su, H. (Su, H..) | Gao, H. (Gao, H..) | Zhang, L. (Zhang, L..)

Indexed by:

Scopus

Abstract:

Automatic generation of code comments can help alleviate software project development and maintenance difficulties caused by insufficient, missing, or mismatched code comments. Previous works have demonstrated that identifying the intention of code and the corresponding comment categories can enhance the accuracy of automatic code comment generation. However, this method's effectiveness relies on the expertise of programmers and requires a significant amount of human effort. We propose an automatic code comment generation method based on different keyword sequences to address this issue. We first investigate the verbs in code comments of mainstream public datasets and use automated methods to classify the comments into three categories. Then we extract and encode the keyword sequences of the code according to the comment category using different ways. The encoded sequences are combined with three classical comment generation models to generate comments automatically. Additionally, an algorithm for selecting API comments is proposed to address the issue of API comment quantity causing a decrease in the quality of generated comments during the keyword selection process. Experimental results indicate that the performance of the baseline model can be improved in terms of BLEU, ROUGE-L, and BLEU-DC metrics. In addition, compared with two models that combine other information, there is a certain degree of improvement in terms of three metrics, indicating that the proposed method can generate code comments more accurately.  © 2023 IEEE.

Keyword:

Automatic comment generation automatic comment classification different keyword sequence verb software maintenance select API comment different models

Author Community:

  • [ 1 ] [Wang C.]Beijing University of Technology, Faculty of Information Technology, Beijing, China
  • [ 2 ] [Su H.]Beijing University of Technology, Faculty of Information Technology, Beijing, China
  • [ 3 ] [Gao H.]Beijing University of Technology, Faculty of Information Technology, Beijing, China
  • [ 4 ] [Zhang L.]Beijing University of Technology, Faculty of Information Technology, Beijing, China

Reprint Author's Address:

Email:

Show more details

Related Keywords:

Related Article:

Source :

Year: 2023

Page: 57-64

Language: English

Cited Count:

WoS CC Cited Count: 0

SCOPUS Cited Count:

ESI Highly Cited Papers on the List: 0 Unfold All

WanFang Cited Count:

Chinese Cited Count:

30 Days PV: 1

Affiliated Colleges:

Online/Total:1178/10846769
Address:BJUT Library(100 Pingleyuan,Chaoyang District,Beijing 100124, China Post Code:100124) Contact Us:010-67392185
Copyright:BJUT Library Technical Support:Beijing Aegean Software Co., Ltd.