结合方法命名源代码的全局和局部表示

Cong Zhou, Li Kuang
{"title":"结合方法命名源代码的全局和局部表示","authors":"Cong Zhou, Li Kuang","doi":"10.1109/ICECCS54210.2022.00026","DOIUrl":null,"url":null,"abstract":"Code is a kind of complex data. Recent models learn code representation using global or local aggregation. Global encoding allows all tokens of code to be connected directly and neglects the graph structure. Local encoding focuses on the neighbor nodes when capturing the graph structure but fails to capture long dependencies. In this work, we gather both encoding strategies and investigate different models that combine both global and local representations of code in order to learn code representation better. Specifically, we modify the layer structure based on the sequence-to-sequence model to incorporate a structured model in the encoder and decoder parts, respectively. To further consider different integration ways, we propose four models for method naming. In an extensive evaluation, we demonstrate that our models have a significant improvement on a well-studied dataset of method naming, achieving ROUGE-1 score of 54.1, ROUGE-2 score of 26.7, and ROUGE-L score of 54.3, outperforming state-of-the-art models by 2.7, 1.7, and 4.3 points, respectively. Our data and code are available at https://github.com/zc-work/CGLNaming.","PeriodicalId":344493,"journal":{"name":"2022 26th International Conference on Engineering of Complex Computer Systems (ICECCS)","volume":"24 54","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Combining Global and Local Representations of Source Code for Method Naming\",\"authors\":\"Cong Zhou, Li Kuang\",\"doi\":\"10.1109/ICECCS54210.2022.00026\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Code is a kind of complex data. Recent models learn code representation using global or local aggregation. Global encoding allows all tokens of code to be connected directly and neglects the graph structure. Local encoding focuses on the neighbor nodes when capturing the graph structure but fails to capture long dependencies. In this work, we gather both encoding strategies and investigate different models that combine both global and local representations of code in order to learn code representation better. Specifically, we modify the layer structure based on the sequence-to-sequence model to incorporate a structured model in the encoder and decoder parts, respectively. To further consider different integration ways, we propose four models for method naming. In an extensive evaluation, we demonstrate that our models have a significant improvement on a well-studied dataset of method naming, achieving ROUGE-1 score of 54.1, ROUGE-2 score of 26.7, and ROUGE-L score of 54.3, outperforming state-of-the-art models by 2.7, 1.7, and 4.3 points, respectively. Our data and code are available at https://github.com/zc-work/CGLNaming.\",\"PeriodicalId\":344493,\"journal\":{\"name\":\"2022 26th International Conference on Engineering of Complex Computer Systems (ICECCS)\",\"volume\":\"24 54\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-03-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 26th International Conference on Engineering of Complex Computer Systems (ICECCS)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICECCS54210.2022.00026\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 26th International Conference on Engineering of Complex Computer Systems (ICECCS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICECCS54210.2022.00026","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

代码是一种复杂的数据。最近的模型使用全局或局部聚合学习代码表示。全局编码允许直接连接代码的所有标记,而忽略图结构。局部编码在捕获图结构时关注邻居节点,但无法捕获长依赖关系。在这项工作中,我们收集了两种编码策略,并研究了结合代码的全局和局部表示的不同模型,以便更好地学习代码表示。具体来说,我们基于序列到序列模型修改了层结构,分别在编码器和解码器部分合并了结构化模型。为了进一步考虑不同的集成方式,我们提出了四种方法命名模型。在广泛的评估中,我们证明了我们的模型在一个经过充分研究的方法命名数据集上有显著的改进,实现了ROUGE-1得分为54.1,ROUGE-2得分为26.7,ROUGE-L得分为54.3,分别比最先进的模型高出2.7,1.7和4.3分。我们的数据和代码可在https://github.com/zc-work/CGLNaming上获得。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Combining Global and Local Representations of Source Code for Method Naming
Code is a kind of complex data. Recent models learn code representation using global or local aggregation. Global encoding allows all tokens of code to be connected directly and neglects the graph structure. Local encoding focuses on the neighbor nodes when capturing the graph structure but fails to capture long dependencies. In this work, we gather both encoding strategies and investigate different models that combine both global and local representations of code in order to learn code representation better. Specifically, we modify the layer structure based on the sequence-to-sequence model to incorporate a structured model in the encoder and decoder parts, respectively. To further consider different integration ways, we propose four models for method naming. In an extensive evaluation, we demonstrate that our models have a significant improvement on a well-studied dataset of method naming, achieving ROUGE-1 score of 54.1, ROUGE-2 score of 26.7, and ROUGE-L score of 54.3, outperforming state-of-the-art models by 2.7, 1.7, and 4.3 points, respectively. Our data and code are available at https://github.com/zc-work/CGLNaming.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Parameter Sensitive Pointer Analysis for Java Optimizing Parallel Java Streams Parameterized Design and Formal Verification of Multi-ported Memory Extension-Compression Learning: A deep learning code search method that simulates reading habits Proceedings 2022 26th International Conference on Engineering of Complex Computer Systems [Title page iii]
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1