Deep Just-In-Time Consistent Comment Update via Source Code Changes

Shikai Guo, Xihui Xu, Hui Li, Rong Chen
{"title":"Deep Just-In-Time Consistent Comment Update via Source Code Changes","authors":"Shikai Guo, Xihui Xu, Hui Li, Rong Chen","doi":"10.1109/PAAP56126.2022.10010469","DOIUrl":null,"url":null,"abstract":"During software development and maintenance, code comments are often missing, inadequate, or they do not match the actual code content. In response to this problem, the research community has proposed a method for updating natural language comments based on code changes. However, there are two major limitations of this method that must be addressed: the long-term and non-temporal dependencies in the source code. To address these limitations, we propose a new model called code semantic learning–comment update (CSL2CU). The code semantic learning component of CSL2CU uses a self-attention mechanism and a positional encoding mechanism. It also uses a relative positional representation to model pairwise relationships between source code tags, thereby improving its ability to capture long-term dependencies and non-temporal dependencies of source code tagging ability. The comment-update component of CSL2CU is used to generate new comments based on old comments and code editing. The experimental results show that the CSL2CU model outperforms the three baselines used in exact match, BLEU, METEOR, and SARI.","PeriodicalId":336339,"journal":{"name":"2022 IEEE 13th International Symposium on Parallel Architectures, Algorithms and Programming (PAAP)","volume":"137 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-11-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE 13th International Symposium on Parallel Architectures, Algorithms and Programming (PAAP)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/PAAP56126.2022.10010469","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

During software development and maintenance, code comments are often missing, inadequate, or they do not match the actual code content. In response to this problem, the research community has proposed a method for updating natural language comments based on code changes. However, there are two major limitations of this method that must be addressed: the long-term and non-temporal dependencies in the source code. To address these limitations, we propose a new model called code semantic learning–comment update (CSL2CU). The code semantic learning component of CSL2CU uses a self-attention mechanism and a positional encoding mechanism. It also uses a relative positional representation to model pairwise relationships between source code tags, thereby improving its ability to capture long-term dependencies and non-temporal dependencies of source code tagging ability. The comment-update component of CSL2CU is used to generate new comments based on old comments and code editing. The experimental results show that the CSL2CU model outperforms the three baselines used in exact match, BLEU, METEOR, and SARI.
通过源代码更改实现深度及时一致的注释更新
在软件开发和维护过程中,经常会出现代码注释缺失、不充分或与实际代码内容不符的情况。针对这一问题,研究界提出了一种根据代码变化更新自然语言注释的方法。然而,这种方法有两大局限性必须解决:源代码中的长期依赖性和非时间依赖性。为了解决这些局限性,我们提出了一种名为代码语义学习-注释更新(CSL2CU)的新模型。CSL2CU 的代码语义学习组件使用自我注意机制和位置编码机制。它还使用相对位置表示法来模拟源代码标记之间的成对关系,从而提高了捕捉源代码标记能力的长期依赖性和非时间依赖性的能力。CSL2CU 的注释更新组件用于根据旧注释和代码编辑生成新注释。实验结果表明,CSL2CU 模型优于精确匹配、BLEU、METEOR 和 SARI 中使用的三种基准。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信