Method name recommendation based on source code metrics

IF 1.7 3区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Saeed Parsa, Morteza Zakeri-Nasrabadi, Masoud Ekhtiarzadeh, Mohammad Ramezani
{"title":"Method name recommendation based on source code metrics","authors":"Saeed Parsa,&nbsp;Morteza Zakeri-Nasrabadi,&nbsp;Masoud Ekhtiarzadeh,&nbsp;Mohammad Ramezani","doi":"10.1016/j.cola.2022.101177","DOIUrl":null,"url":null,"abstract":"<div><p>Method naming is a critical factor in program comprehension, affecting software quality. State-of-the-art naming techniques use deep learning to compute the methods’ similarity considering their textual contents. They highly depend on identifiers’ names and do not compute semantical interrelations among methods’ instructions. Source code metrics compute such semantical interrelations. This article proposes using source code metrics to measure semantical and structural cross-project similarities. The metrics constitute features of a KNN model, determining the k-most similar methods to a given method. Experiments with 4000000 Java methods on the proposed model demonstrate improvements in precision and recall of state-of-the-arts with 4.25 and 12.08%.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"74 ","pages":"Article 101177"},"PeriodicalIF":1.7000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Computer Languages","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2590118422000740","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 4

Abstract

Method naming is a critical factor in program comprehension, affecting software quality. State-of-the-art naming techniques use deep learning to compute the methods’ similarity considering their textual contents. They highly depend on identifiers’ names and do not compute semantical interrelations among methods’ instructions. Source code metrics compute such semantical interrelations. This article proposes using source code metrics to measure semantical and structural cross-project similarities. The metrics constitute features of a KNN model, determining the k-most similar methods to a given method. Experiments with 4000000 Java methods on the proposed model demonstrate improvements in precision and recall of state-of-the-arts with 4.25 and 12.08%.

基于源代码度量的方法名称推荐
方法命名是程序理解中的一个关键因素,影响着软件的质量。最先进的命名技术使用深度学习来计算方法的相似度,考虑它们的文本内容。它们高度依赖于标识符的名称,并且不计算方法指令之间的语义相互关系。源代码度量计算这种语义上的相互关系。本文建议使用源代码度量来度量语义和结构上的跨项目相似性。这些指标构成了KNN模型的特征,决定了与给定方法最相似的k个方法。用400000种Java方法对该模型进行了实验,结果表明该模型的查全率和查全率分别提高了4.25%和12.08%。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Computer Languages
Journal of Computer Languages Computer Science-Computer Networks and Communications
CiteScore
5.00
自引率
13.60%
发文量
36
×
引用
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学术官方微信