Evaluating Code Comment Generation With Summarized API Docs

被引:0
|
作者
Matmti, Bilel [1 ]
Fard, Fatemeh [1 ]
机构
[1] Univ British Columbia, Dept Comp Sci, Okanagan, BC, Canada
基金
加拿大自然科学与工程研究理事会;
关键词
API Docs; text summarization; comment generation; external knowledge source;
D O I
10.1109/NLBSE59153.2023.00019
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Code comment generation is the task of generating a high-level natural language description for a given code snippet. API2Com is a comment generation model designed to leverage the Application Programming Interface Documentations (API Docs) as an external knowledge resource. Shahbazi et al. [1] showed that API Docs might help increase the model's performance. However, the model's performance in generating pertinent comments deteriorates due to the lengthy documentation used in the input as the number of APIs used in a method increases. In this paper, we propose to evaluate how summarizing the API Docs using an extractive text summarization technique, TextRank, will impact the overall performance of the API2Com. The results of our experiments using the same Java dataset confirm the inverse correlation between the number of APIs and the model's performance. As the number of APIs increases, the performance metrics tend to deteriorate for both configurations of the model, with or without API Docs summarization using TextRank. Experiments also show the impact of the number of APIs on TextRank algorithm capacity to improve the model performance. For example, with 8 APIs, TextRank summarization improved the model BLEU score by 18% on average, but the performance tends to decrease as the number of APIs increases. This demonstrates an open area of research to determine the winning combination in terms of the model configuration and the length of documentation used.
引用
收藏
页码:60 / 63
页数:4
相关论文
共 50 条
  • [41] CodeDoctor: multi-category code review comment generation
    Li, Yingling
    Wu, Yuhan
    Wang, Zi'ao
    Huang, Lei
    Wang, Junjie
    Li, Jianping
    Huang, Minying
    AUTOMATED SOFTWARE ENGINEERING, 2025, 32 (01)
  • [42] MACs: Mining API code snippets for code reuse
    Hsu, Sheng-Kuei
    Lin, Shi-Jen
    EXPERT SYSTEMS WITH APPLICATIONS, 2011, 38 (06) : 7291 - 7301
  • [43] CloCom: Mining Existing Source Code for Automatic Comment Generation
    Wong, Edmund
    Liu, Taiyue
    Tan, Lin
    2015 22ND INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), 2015, : 380 - 389
  • [44] Deep code comment generation with hybrid lexical and syntactical information
    Xing Hu
    Ge Li
    Xin Xia
    David Lo
    Zhi Jin
    Empirical Software Engineering, 2020, 25 : 2179 - 2217
  • [45] Code Comment Generation Based on Concept Propagation for Software Projects
    Pan X.-L.
    Liu C.-X.
    Wang M.
    Zou Y.-Z.
    Wang T.
    Xie B.
    Ruan Jian Xue Bao/Journal of Software, 2023, 34 (09): : 4114 - 4131
  • [46] A Multi-Encoder Model for Automatic Code Comment Generation
    Qiu, Jian
    Li, Shenglin
    Proceedings of SPIE - The International Society for Optical Engineering, 2024, 13107
  • [47] Implementing Structured Authoring Practices in a Docs-as-Code Framework
    Berger, Arthur
    PROCEEDINGS OF THE 42ND INTERNATIONAL CONFERENCE ON DESIGN OF COMMUNICATION, SIGDOC 2024, 2024, : 239 - 244
  • [48] Framework for evaluating code generation ability of large language models
    Yeo, Sangyeop
    Ma, Yu-Seung
    Kim, Sang Cheol
    Jun, Hyungkook
    Kim, Taeho
    ETRI JOURNAL, 2024, 46 (01) : 106 - 117
  • [49] Quantifying Contamination in Evaluating Code Generation Capabilities of Language Models
    Riddell, Martin
    Ni, Ansong
    Cohan, Arman
    PROCEEDINGS OF THE 62ND ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, VOL 1: LONG PAPERS, 2024, : 14116 - 14137
  • [50] Summarized criterion for evaluating wear resistance and strength of steels
    G. M. Sorokin
    V. N. Malyshev
    I. B. Kurakin
    Journal of Friction and Wear, 2013, 34 : 454 - 459