paper-with-me

Papers

APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentation

2023-03-03 · Ramin Shahbazi, Fatemeh Fard

Code comments are significantly helpful in comprehending software programs and also aid developers to save a great deal of time in software maintenance. Code comment generation aims to automatically predict comments in natural language given a code snippet. Several works investigate the effect of integrating external knowledge on the quality of generated comments. In this study, we propose a solution, namely APIContext2Com, to improve the effectiveness of generated comments by incorporating the pre-defined Application Programming Interface (API) context. The API context includes the definition and description of the pre-defined APIs that are used within the code snippets. As the detailed API information expresses the functionality of a code snippet, it can be helpful in better generating the code summary. We introduce a seq-2-seq encoder-decoder neural network model with different sets of multiple encoders to effectively transform distinct inputs into target comments. A ranking mechanism is also developed to exclude non-informative APIs, so that we can filter out unrelated APIs. We evaluate our approach using the Java dataset from CodeSearchNet. The findings reveal that the proposed model improves the best baseline by 1.88 (8.24 %), 2.16 (17.58 %), 1.38 (18.3 %), 0.73 (14.17 %), 1.58 (14.98 %) and 1.9 (6.92 %) for BLEU1, BLEU2, BLEU3, BLEU4, METEOR, ROUGE-L respectively. Human evaluation and ablation studies confirm the quality of the generated comments and the effect of architecture and ranking APIs.

📄 PDF Abstract BibTeX arXiv:2303.01645

Code (0)

등록된 구현이 없습니다.

Tasks

Code Comment GenerationComment GenerationDecoder

Similar Papers 제목 키워드 기반

Learning to Generate Code Comments from Class Hierarchies

2021-03-24 · Jiyang Zhang, Sheena Panthaplackel, Pengyu Nie, Raymond J. Mooney 외

Descriptive code comments are essential for supporting code comprehension and maintenance. We propose the task of automatically generating comments for overriding methods. We formulate a novel framework which accommodate…

Comment GenerationDescriptiveSpecificity

Automatic Comment Generation via Multi-Pass Deliberation

2022-09-14 · Fangwen Mu, Xiao Chen, Lin Shi, Song Wang 외

Deliberation is a common and natural behavior in human daily life. For example, when writing papers or articles, we usually first write drafts, and then iteratively polish them until satisfied. In light of such a human c…

ArticlesComment Generation

DeepCRCEval: Revisiting the Evaluation of Code Review Comment Generation

2024-12-24 · Junyi Lu, Xiaojia Li, Zihan Hua, Lei Yu 외

Code review is a vital but demanding aspect of software development, generating significant interest in automating review comments. Traditional evaluation methods for these comments, primarily based on text similarity, f…

Comment GenerationFew-Shot Learningtext similarity

Enhancing Binary Code Comment Quality Classification: Integrating Generative AI for Improved Accuracy

2023-10-14 · Rohith Arumugam S, Angel Deborah S

This report focuses on enhancing a binary code comment quality classification model by integrating generated code and comment pairs, to improve model accuracy. The dataset comprises 9048 pairs of code and comments writte…

Language ModelingLanguage ModellingLarge Language Model

Retrieve and Refine: Exemplar-based Neural Comment Generation

2020-10-09 · Bolin Wei, Yongmin Li, Ge Li, Xin Xia 외

Code comment generation which aims to automatically generate natural language descriptions for source code, is a crucial task in the field of automatic software development. Traditional comment generation methods use man…

Code Comment GenerationComment GenerationInformation RetrievalRetrieval+2