• 文献检索
  • 文档翻译
  • 深度研究
  • 学术资讯
  • Suppr Zotero 插件Zotero 插件
  • 邀请有礼
  • 套餐&价格
  • 历史记录
应用&插件
Suppr Zotero 插件Zotero 插件浏览器插件Mac 客户端Windows 客户端微信小程序
定价
高级版会员购买积分包购买API积分包
服务
文献检索文档翻译深度研究API 文档MCP 服务
关于我们
关于 Suppr公司介绍联系我们用户协议隐私条款
关注我们

Suppr 超能文献

核心技术专利:CN118964589B侵权必究
粤ICP备2023148730 号-1Suppr @ 2026

文献检索

告别复杂PubMed语法,用中文像聊天一样搜索,搜遍4000万医学文献。AI智能推荐,让科研检索更轻松。

立即免费搜索

文件翻译

保留排版,准确专业,支持PDF/Word/PPT等文件格式,支持 12+语言互译。

免费翻译文档

深度研究

AI帮你快速写综述,25分钟生成高质量综述,智能提取关键信息,辅助科研写作。

立即免费体验

克隆建议器:利用深度学习和信息检索推荐代码令牌和克隆方法。

Clone-advisor: recommending code tokens and clone methods with deep learning and information retrieval.

作者信息

Hammad Muhammad, Babur Önder, Abdul Basit Hamid, van den Brand Mark

机构信息

Eindhoven University of Technology, Eindhoven, Netherlands.

Wageningen University and Research, Wageningen, Netherlands.

出版信息

PeerJ Comput Sci. 2021 Nov 9;7:e737. doi: 10.7717/peerj-cs.737. eCollection 2021.

DOI:10.7717/peerj-cs.737
PMID:34909463
原文链接:https://pmc.ncbi.nlm.nih.gov/articles/PMC8641571/
Abstract

Software developers frequently reuse source code from repositories as it saves development time and effort. Code clones (similar code fragments) accumulated in these repositories represent often repeated functionalities and are candidates for reuse in an exploratory or rapid development. To facilitate code clone reuse, we previously presented DeepClone, a novel deep learning approach for modeling code clones along with non-cloned code to predict the next set of tokens (possibly a complete clone method body) based on the code written so far. The probabilistic nature of language modeling, however, can lead to code output with minor syntax or logic errors. To resolve this, we propose a novel approach called Clone-Advisor. We apply an information retrieval technique on top of DeepClone output to recommend real clone methods closely matching the predicted clone method, thus improving the original output by DeepClone. In this paper we have discussed and refined our previous work on DeepClone in much more detail. Moreover, we have quantitatively evaluated the performance and effectiveness of Clone-Advisor in clone method recommendation.

摘要

软件开发人员经常从代码库中复用源代码,因为这样可以节省开发时间和精力。这些代码库中积累的代码克隆(相似的代码片段)通常代表着重复的功能,是探索性开发或快速开发中可复用的候选对象。为了促进代码克隆的复用,我们之前提出了DeepClone,这是一种新颖的深度学习方法,用于对代码克隆以及非克隆代码进行建模,以便根据到目前为止编写的代码预测下一组令牌(可能是一个完整的克隆方法体)。然而,语言建模的概率性质可能会导致代码输出出现一些小的语法或逻辑错误。为了解决这个问题,我们提出了一种名为Clone-Advisor的新颖方法。我们在DeepClone输出之上应用信息检索技术,以推荐与预测的克隆方法紧密匹配的实际克隆方法,从而改进DeepClone的原始输出。在本文中,我们更详细地讨论并完善了我们之前关于DeepClone的工作。此外,我们还对Clone-Advisor在克隆方法推荐中的性能和有效性进行了定量评估。

https://cdn.ncbi.nlm.nih.gov/pmc/blobs/7747/8641571/73088c86f3e6/peerj-cs-07-737-g004.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/7747/8641571/a6a45d2b87ed/peerj-cs-07-737-g001.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/7747/8641571/bc1fcb65ea64/peerj-cs-07-737-g002.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/7747/8641571/97cb471fb2b5/peerj-cs-07-737-g003.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/7747/8641571/73088c86f3e6/peerj-cs-07-737-g004.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/7747/8641571/a6a45d2b87ed/peerj-cs-07-737-g001.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/7747/8641571/bc1fcb65ea64/peerj-cs-07-737-g002.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/7747/8641571/97cb471fb2b5/peerj-cs-07-737-g003.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/7747/8641571/73088c86f3e6/peerj-cs-07-737-g004.jpg

相似文献

1
Clone-advisor: recommending code tokens and clone methods with deep learning and information retrieval.克隆建议器:利用深度学习和信息检索推荐代码令牌和克隆方法。
PeerJ Comput Sci. 2021 Nov 9;7:e737. doi: 10.7717/peerj-cs.737. eCollection 2021.
2
CRaDLe: Deep code retrieval based on semantic Dependency Learning.CRaDLe:基于语义依存学习的深度代码检索
Neural Netw. 2021 Sep;141:385-394. doi: 10.1016/j.neunet.2021.04.019. Epub 2021 Apr 26.
3
A novel code representation for detecting Java code clones using high-level and abstract compiled code representations.一种使用高级和抽象的编译代码表示来检测 Java 代码克隆的新代码表示方法。
PLoS One. 2024 May 10;19(5):e0302333. doi: 10.1371/journal.pone.0302333. eCollection 2024.
4
An Intelligent Platform for Software Component Mining and Retrieval.用于软件组件挖掘与检索的智能平台。
Sensors (Basel). 2023 Jan 3;23(1):525. doi: 10.3390/s23010525.
5
Software defect prediction using hybrid model (CBIL) of convolutional neural network (CNN) and bidirectional long short-term memory (Bi-LSTM).使用卷积神经网络(CNN)和双向长短期记忆网络(Bi-LSTM)的混合模型(CBIL)进行软件缺陷预测。
PeerJ Comput Sci. 2021 Nov 16;7:e739. doi: 10.7717/peerj-cs.739. eCollection 2021.
6
A systematic literature review on the applications of recurrent neural networks in code clone research.基于循环神经网络在代码克隆研究中的应用的系统性文献回顾。
PLoS One. 2024 Feb 2;19(2):e0296858. doi: 10.1371/journal.pone.0296858. eCollection 2024.
7
Enriching query semantics for code search with reinforcement learning.用强化学习丰富代码搜索的查询语义。
Neural Netw. 2022 Jan;145:22-32. doi: 10.1016/j.neunet.2021.09.025. Epub 2021 Oct 11.
8
Re_Trans: Combined Retrieval and Transformer Model for Source Code Summarization.用于源代码摘要的联合检索与Transformer模型
Entropy (Basel). 2022 Sep 27;24(10):1372. doi: 10.3390/e24101372.
9
[Analysis, identification and correction of some errors of model refseqs appeared in NCBI Human Gene Database by in silico cloning and experimental verification of novel human genes].[通过新型人类基因的电子克隆和实验验证对NCBI人类基因数据库中出现的模型参考序列的一些错误进行分析、鉴定和校正]
Yi Chuan Xue Bao. 2004 May;31(5):431-43.
10
FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code.FindICI:利用机器学习检测基础设施即代码中代码与自然语言描述之间的语言不一致性。
Empir Softw Eng. 2022;27(7):178. doi: 10.1007/s10664-022-10215-5. Epub 2022 Sep 20.

本文引用的文献

1
Long short-term memory.长短期记忆
Neural Comput. 1997 Nov 15;9(8):1735-80. doi: 10.1162/neco.1997.9.8.1735.