arrow
返回

A Comparative Study on Method Comment and Inline Comment

delete2023-07-22
delete8
delete
OA
AI
黄袁 封面图
黄袁 (Yuan Huang) *
H
Hanyang Guo
X
Xi Ding
J
Junhuai Shu
X
Xiangping Chen
X
Xiapu Luo
Z
Zibin Zheng
X
Xiaocong Zhou
DOI:10.1145/3582570delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
Code comments are one of the important documents to help developers review and comprehend source code. In recent studies, researchers have proposed many deep learning models to generate the method header comments (i.e., method comment), which have achieved encouraging results. The comments in the method, which is called inline comment, are also important for program comprehension. Unfortunately, they have not received enough attention in automatic generation when comparing with the method comments. In this paper, we compare and analyze the similarities and differences between the method comments and the inline comments. By applying the existing models of generating method comments to the inline comment generation, we find that these existing models perform worse on the task of inline comment generation. We then further explore the possible reasons and obtain a number of new observations. For example, we find that there are a lot of templates (i.e., comments with the same or similar structures) in the method comment dataset, which makes the models perform better. Some terms were thought to be important (e.g., API calls) in the comment generation by previous study does not significantly affect the quality of the generated comments, which seems counter-intuitive. Our findings may give some implications for building the approaches of method comment or inline comment generation in the future.
Keyword:
Code comment
comparative study
comment generation
method comment
inline comment
Taxonomy of inline code comment smells内联代码注释气味的分类
err2024-04-03
err1
errOAAI
errJabrayilzade, Elgun; Yurtoglu, Ayda; Tuzun, Eray
err分享
err收藏
An alternative to code comment generation? Generating comment from bytecode代码注释生成的替代方法?从字节码生成注释
err2025-03-01
err0
PREAI
errChen, Xiangping; Chen, Junqi; Lian, Zhilu; Huang, Yuan; Zhou, Xiaocong; Wu, Yunzhi; Zheng, Zibin
err分享
err收藏
CCISolver: End-to-End Detection and Repair of Method-Level Code-Comment InconsistencyCCISolver:端到端检测和修复方法级代码-注释不一致
err2026-08-06
err0
PREAI
errRenyi Zhong; Yintong Huo; Wenwei Gu; Jinxi Kuang; Zhihan Jiang; Guangba Yu; Yichen Li; David Lo; Michael R. Lyu
err分享
err收藏
err分享
err收藏
err分享
err收藏
CommtPst: Deep learning source code for commenting positions prediction
err2020-12-01
err15
PREAI
errHuang, Yuan; Hu, Xinyu; Jia, Nan; Chen, Xiangping; Zheng, Zibin; Luo, Xiapu
err分享
err收藏

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.4K
被引数:
4.5K

机构

中山大学 封面图
中山大学
学者数:
9
论文数: 6
被引数: 5.9W
香
香港理工大學
学者数:
2.2K
论文数: 1.1K
被引数: 4.1W
引用论文

引用论文

err
IF0
err
err0
errOAAI
err
err分享
err收藏
err分享
err收藏
err分享
err收藏
Poorer self-rated health in residential areas with limited healthcare supply
err2014-02-12
err0
PREAI
errSigríður Haraldsdóttir; Unnur A Valdimarsdóttir; Sigurður Guðmundsson
err分享
err收藏
Establishment and characterization of a new triple-negative canine mammary cancer cell line
err2018-10-01
err0
PREAI
errHong Zhang; Shimin Pei; Bin Zhou; Huanan Wang; Hongchao Du; Di Zhang; Degui Lin
err分享
err收藏
学者 查看更多内容