Code comments play a prominent role in program comprehension activities. However, source code is not always documented and code and comments not always co-evolve. To deal with these issues, researchers have proposed techniques to automatically generate comments documenting a given code at hand. The most recent works in the area applied deep learning (DL) techniques to support such a task. Despite the achieved advances, the empirical evaluations of these approaches show that they are still far from a performance level that would make them valuable for developers. We tackle a simpler and related problem: Code comment completion. Instead of generating a comment for a given code from scratch, we investigate the extent to which state-of-the-art techniques can help developers in writing comments faster. We present a large-scale study in which we empirically assess how a simple n-gram model and the recently proposed Text-To-Text Transfer Transformer (T5) architecture can perform in autocompleting a code comment the developer is typing. The achieved results show the superiority of the T5 model, despite the n-gram model being a competitive solution.


翻译:守则评论在方案理解活动中发挥着突出作用。 但是,源代码并不总是有文件记录,代码和评论并不总是共同演变。为了处理这些问题,研究人员提出了自动生成注释以记录手头的某一代码的技术。该领域的最新工作运用了深层次学习(DL)技术来支持这项任务。尽管取得了进步,对这些方法的经验评价表明,它们仍然远远没有达到能使其对开发者有价值的业绩水平。我们处理了一个简单和相关的问题:代码评论完成。我们没有从头开始为某一代码产生评论,而是调查了最先进的技术能够在多大程度上帮助开发者更快地撰写评论。我们提出了一个大规模研究,我们从经验上评估了简单的n-gram模型和最近提议的文本到Text转换器(T5)结构如何在自动完成对开发者正在输入的代码评论方面能够发挥作用。所取得的结果显示了T5模型的优越性,尽管n-gram模型是一种竞争性的解决办法。

1
下载
关闭预览

相关内容

自然语言处理现代方法,176页pdf
专知会员服务
268+阅读 · 2021年2月22日
神经常微分方程教程,50页ppt,A brief tutorial on Neural ODEs
专知会员服务
74+阅读 · 2020年8月2日
专知会员服务
166+阅读 · 2020年7月27日
强化学习最新教程,17页pdf
专知会员服务
177+阅读 · 2019年10月11日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
Hierarchically Structured Meta-learning
CreateAMind
26+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
28+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
42+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
17+阅读 · 2018年12月24日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
笔记 | Sentiment Analysis
黑龙江大学自然语言处理实验室
10+阅读 · 2018年5月6日
Python机器学习教程资料/代码
机器学习研究会
8+阅读 · 2018年2月22日
推荐|Andrew Ng计算机视觉教程总结
全球人工智能
3+阅读 · 2017年11月23日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
【推荐】GAN架构入门综述(资源汇总)
机器学习研究会
10+阅读 · 2017年9月3日
Generating Fact Checking Explanations
Arxiv
9+阅读 · 2020年4月13日
Neural Module Networks for Reasoning over Text
Arxiv
9+阅读 · 2019年12月10日
Arxiv
6+阅读 · 2018年6月18日
VIP会员
相关VIP内容
自然语言处理现代方法,176页pdf
专知会员服务
268+阅读 · 2021年2月22日
神经常微分方程教程,50页ppt,A brief tutorial on Neural ODEs
专知会员服务
74+阅读 · 2020年8月2日
专知会员服务
166+阅读 · 2020年7月27日
强化学习最新教程,17页pdf
专知会员服务
177+阅读 · 2019年10月11日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
26+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
28+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
42+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
17+阅读 · 2018年12月24日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
笔记 | Sentiment Analysis
黑龙江大学自然语言处理实验室
10+阅读 · 2018年5月6日
Python机器学习教程资料/代码
机器学习研究会
8+阅读 · 2018年2月22日
推荐|Andrew Ng计算机视觉教程总结
全球人工智能
3+阅读 · 2017年11月23日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
【推荐】GAN架构入门综述(资源汇总)
机器学习研究会
10+阅读 · 2017年9月3日
Top
微信扫码咨询专知VIP会员