arrow
返回

Why My Code Summarization Model Does NotWork: Code Comment Improvement with Category Prediction

delete2021-02-10
delete57
delete
OA
AI
Q
Qiuyuan Chen
X
Xin Xia *
H
Han Hu
David Lo 封面图
David Lo (David Lo)
S
Shanping Li
DOI:10.1145/3434280delete
delete原文链接
delete分享
delete收藏
查看原文
摘要

摘要

En 中文
Code summarization aims at generating a code comment given a block of source code and it is normally performed by training machine learning algorithms on existing code block-comment pairs. Code comments in practice have different intentions. For example, some code comments might explain how the methods work, while others explain why some methods are written. Previous works have shown that a relationship exists between a code block and the category of a comment associated with it. In this article, we aim to investigate to which extent we can exploit this relationship to improve code summarization performance. We first classify comments into six intention categories and manually label 20,000 code-comment pairs. These categories include what, why, how-to-use, how-it-is-done, property, and others. Based on this dataset, we conduct an experiment to investigate the performance of different state-of-the-art code summarization approaches on the categories. We find that the performance of different code summarization approaches varies substantially across the categories. Moreover, the category for which a code summarization model performs the best is different for the different models. In particular, no models perform the best for why and property comments among the six categories. We design a composite approach to demonstrate that comment category prediction can boost code summarization to reach better results. The approach leverages classified code-category labeled data to train a classifier to infer categories. Then it selects the most suitable models for inferred categories and outputs the composite results. Our composite approach outperforms other approaches that do not consider comment categories and obtains a relative improvement of 8.57% and 16.34% in terms of ROUGE-L and BLEU-4 score, respectively.
Keyword:
Code summarization
code comment
comment classification
AI总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

On the Significance of Category Prediction for Code-Comment Synchronization
err2023-03-29
err22
PREAI
errYang, Zhen; Keung, Jacky Wai; Yu, Xiao; Xiao, Yan; Jin, Zhi; Zhang, Jingyu
err分享
err收藏
err分享
err收藏
Towards automatically generating block comments for code snippets走向自动生成代码片段的块注释
err2020-11-01
err24
PREAI
errHuang, Yuan; Huang, Shaohao; Chen, Huanchao; Chen, Xiangping; Zheng, Zibin; Luo, Xiapu; Jia, Nan; Hu, Xinyu; Zhou, Xiaocong
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收藏
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收藏
Taxonomy of inline code comment smells内联代码注释气味的分类
err2024-04-03
err1
errOAAI
errJabrayilzade, Elgun; Yurtoglu, Ayda; Tuzun, Eray
err分享
err收藏
Learning Code Context Information to Predict Comment Locations学习代码上下文信息以预测注释位置
err2020-03-01
err22
PREAI
errHuang, Yuan; Hu, Xinyu; Jia, Nan; Chen, Xiangping; Xiong, Yingfei; Zheng, Zibin
err分享
err收藏

期刊

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

机构

浙江大学 封面图
浙江大学
学者数:
1.5K
论文数: 463
被引数: 9.6W
新
新加坡管理大学
学者数:
229
论文数: 159
被引数: 2.3K
M
monash university
学者数:
3.6K
论文数: 1.4K
被引数: 4.5W
学者 查看更多机构
引用论文

引用论文

err
IF0
err
err0
errOAAI
err
err分享
err收藏
Homeobox Gene Involvement in Normal Hematopoiesis and in the Pathogenesis of Childhood Leukemias
err2017-01-01
err0
PREAI
errMaria Adamaki; Maria Goulielmaki; Ioannis Christodoulou; Spiros Vlahopoulos; Vassilis Zoumpourlis
err分享
err收藏
How are Java software developers usiong the eclipse IDE?
err2006-07-01
err278
PREAI
errMurphy, Gail C.; Kersten, Mik; Findlater, Leah
err分享
err收藏
err分享
err收藏
Severe cystic fibrosis associated with a DeltaF508/R347H+D979A compound heterozygous genotype
err1998-01-01
err0
PREAI
errSatoko Hojo; Jiro Fujita; Hiroshi Miyawaki; Yuka Obayashi; Jiro Takahara; Dennis W. Bartholomew
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收藏
err分享
err收藏
err分享
err收藏
学者 查看更多内容