Developers often write low-quality code comments due to the lack of programming experience, which can reduce the efficiency of developers program comprehension. Therefore, developers hope that code comment generation tools can be developed to illustrate the functionality and purpose of the code. Recently, researchers mainly model this problem as the neural machine translation problem and tend to use deep learning-based methods. In this study, we propose a novel method ComFormer based on Transformer and fusion method-based hybrid code presentation. Moreover, to alleviate OOV (out-of-vocabulary) problem and speed up model training, we further utilize the Byte-BPE algorithm to split identifiers and Sim_SBT method to perform AST Traversal. We compare ComFormer with seven state-of-the-art baselines from code comment generation and neural machine translation domains. Comparison results show the competitiveness of ComFormer in terms of three performance measures. Moreover, we perform a human study to verify that ComFormer can generate high-quality comments.


翻译:开发者往往因为缺乏编程经验而写低质量的代码评论,这可以降低开发者程序理解的效率。 因此, 开发者希望能够开发代码评论生成工具来说明代码的功能和目的。 最近, 研究人员主要将这一问题作为神经机器翻译问题模型, 并倾向于使用深层次的学习方法。 在这次研究中, 我们基于变换器和混合法混合代码演示, 提出了一个新型的ComFormer 方法。 此外, 为了缓解OOOV( 校外)问题并加快模型培训, 我们进一步使用BY- BPE算法来分割识别器和Sim_ SBT 方法来进行 AST Traversal 。 我们从代码评论生成和神经机器翻译域中将ComFormer 与七个最先进的基线进行比较, 比较结果显示ComFormer 在三种性能措施方面的竞争力。 此外, 我们进行了一项人类研究, 以核实ComFormer 能够产生高质量的评论。

0
下载
关闭预览

相关内容

专知会员服务
61+阅读 · 2021年5月28日
深度强化学习策略梯度教程,53页ppt
专知会员服务
184+阅读 · 2020年2月1日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
本周值得读:13 份最新开源「Paper + Code」
PaperWeekly
9+阅读 · 2018年1月19日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
【论文】图上的表示学习综述
机器学习研究会
15+阅读 · 2017年9月24日
Question Generation by Transformers
Arxiv
5+阅读 · 2019年9月14日
VIP会员
相关资讯
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
本周值得读:13 份最新开源「Paper + Code」
PaperWeekly
9+阅读 · 2018年1月19日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
【论文】图上的表示学习综述
机器学习研究会
15+阅读 · 2017年9月24日
Top
微信扫码咨询专知VIP会员