Personalized Code Recommendation

Tam The Nguyen, P. Vu, T. Nguyen
{"title":"Personalized Code Recommendation","authors":"Tam The Nguyen, P. Vu, T. Nguyen","doi":"10.1109/ICSME.2019.00047","DOIUrl":null,"url":null,"abstract":"The current state-of-the-art methods in code recommendation mostly take the crowd-based approach. The basic idea is to collect and extract code patterns from a large pool of available source code and use those code patterns for recommendations. However, different programmers have different coding styles, levels of experience, and knowledge about libraries and frameworks, all of which cause different uses of variable names, classes, and methods. When code of different programmers is combined, such differences are blurred, which could hurt the performance of the code recommendation tool for a specific programmer. In the paper, we explore a new research direction in code recommendation which focuses on personal coding patterns of programmers. As a proof of concept, we have developed a personalized code recommendation model for suggesting variable declaration and initialization code. Our techniques learn personalized code patterns for each programmer based on their coding history. The preliminary evaluation shows that our recommendation model is highly effective. For example, when evaluating on a programmer, our approach has top-1 accuracy of 62% and top-3 accuracy of 70% on recommending declaration types. Our approach has top-1 and top-3 accuracy of 67% and 76%, respectively, on recommending initialization method sequences. Furthermore, our model also outperforms the baselines significantly in these experiments.","PeriodicalId":106748,"journal":{"name":"2019 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2019-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 IEEE International Conference on Software Maintenance and Evolution (ICSME)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICSME.2019.00047","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

Abstract

The current state-of-the-art methods in code recommendation mostly take the crowd-based approach. The basic idea is to collect and extract code patterns from a large pool of available source code and use those code patterns for recommendations. However, different programmers have different coding styles, levels of experience, and knowledge about libraries and frameworks, all of which cause different uses of variable names, classes, and methods. When code of different programmers is combined, such differences are blurred, which could hurt the performance of the code recommendation tool for a specific programmer. In the paper, we explore a new research direction in code recommendation which focuses on personal coding patterns of programmers. As a proof of concept, we have developed a personalized code recommendation model for suggesting variable declaration and initialization code. Our techniques learn personalized code patterns for each programmer based on their coding history. The preliminary evaluation shows that our recommendation model is highly effective. For example, when evaluating on a programmer, our approach has top-1 accuracy of 62% and top-3 accuracy of 70% on recommending declaration types. Our approach has top-1 and top-3 accuracy of 67% and 76%, respectively, on recommending initialization method sequences. Furthermore, our model also outperforms the baselines significantly in these experiments.
个性化代码推荐
当前最先进的代码推荐方法大多采用基于人群的方法。其基本思想是从大量可用源代码中收集和提取代码模式,并将这些代码模式用于推荐。然而,不同的程序员有不同的编码风格、经验水平以及对库和框架的了解,所有这些都会导致对变量名、类和方法的不同使用。当不同程序员的代码组合在一起时,这种差异就会变得模糊,这可能会损害针对特定程序员的代码推荐工具的性能。在本文中,我们探索了一个新的研究方向,即关注程序员的个人编码模式。作为概念验证,我们开发了一个个性化的代码推荐模型,用于建议变量声明和初始化代码。我们的技术根据每个程序员的编码历史为他们学习个性化的代码模式。初步评价表明,我们的推荐模型是非常有效的。例如,在对程序员进行评估时,我们的方法在推荐声明类型方面的前1名准确率为62%,前3名准确率为70%。我们的方法在推荐初始化方法序列上的前1和前3准确率分别为67%和76%。此外,我们的模型在这些实验中也明显优于基线。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术文献互助群
群 号:481959085
Book学术官方微信