Automated Identifier Completion and Replacement

S. Abebe, P. Tonella
{"title":"Automated Identifier Completion and Replacement","authors":"S. Abebe, P. Tonella","doi":"10.1109/CSMR.2013.35","DOIUrl":null,"url":null,"abstract":"Various studies indicate that having concise and consistent identifiers improves the quality of the source code and hence impacts positively source code understanding and maintenance. In order to write concise and consistent identifiers, however, developers need to have some knowledge about the concepts captured in the source code and how they are named. Acquiring such knowledge from the source code might be feasible only for small systems, while it is not viable for large systems. In this paper, we propose an automated approach which exploits concepts and relations automatically extracted from the source code to suggest identifiers. The suggestion is ranked based on the context in which a new identifier is introduced and it can be used either to complete the identifier being written or to replace it with a more appropriate one. To validate the proposed approach, we have conducted a case study by simulating the activities of a developer in naming identifiers. The results of the study show that in the majority of the cases our approach provides completion suggestions which match the identifiers actually used by the developers.","PeriodicalId":309343,"journal":{"name":"2013 17th European Conference on Software Maintenance and Reengineering","volume":"140 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-03-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"21","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2013 17th European Conference on Software Maintenance and Reengineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CSMR.2013.35","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 21

Abstract

Various studies indicate that having concise and consistent identifiers improves the quality of the source code and hence impacts positively source code understanding and maintenance. In order to write concise and consistent identifiers, however, developers need to have some knowledge about the concepts captured in the source code and how they are named. Acquiring such knowledge from the source code might be feasible only for small systems, while it is not viable for large systems. In this paper, we propose an automated approach which exploits concepts and relations automatically extracted from the source code to suggest identifiers. The suggestion is ranked based on the context in which a new identifier is introduced and it can be used either to complete the identifier being written or to replace it with a more appropriate one. To validate the proposed approach, we have conducted a case study by simulating the activities of a developer in naming identifiers. The results of the study show that in the majority of the cases our approach provides completion suggestions which match the identifiers actually used by the developers.
自动标识符完成和替换
各种研究表明,拥有简洁一致的标识符可以提高源代码的质量,从而对源代码的理解和维护产生积极的影响。但是,为了编写简洁一致的标识符,开发人员需要了解源代码中捕获的概念以及它们的命名方式。从源代码中获取此类知识可能只适用于小型系统,而不适用于大型系统。在本文中,我们提出了一种自动化的方法,利用从源代码中自动提取的概念和关系来建议标识符。建议根据引入新标识符的上下文进行排序,它既可以用来完成正在编写的标识符,也可以用更合适的标识符替换它。为了验证所建议的方法,我们通过模拟开发人员在命名标识符方面的活动进行了一个案例研究。研究结果表明,在大多数情况下,我们的方法提供的补全建议与开发人员实际使用的标识符相匹配。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信
小红书