Refactoring Generics in JAVA: A Case Study on Extract Method

Raúl Marticorena Sánchez, C. L. Nozal, Yania Crespo, F. P. García
{"title":"Refactoring Generics in JAVA: A Case Study on Extract Method","authors":"Raúl Marticorena Sánchez, C. L. Nozal, Yania Crespo, F. P. García","doi":"10.1109/CSMR.2010.38","DOIUrl":null,"url":null,"abstract":"The addition of support for genericity to mainstream programming languages has a notable influence in refactoring tools. This also applies to the JAVA programming language. Those versions of the language specification prior to JAVA 5 did not include support for generics. Therefore, refactoring tools had to evolve to modify their refactoring implementations according to the new language characteristics in order to assure the correct effects when transforming code containing generic definitions or using generic instantiations. This paper presents an evaluation of the behaviour of refactoring tools on source code that defines or uses generics. We compare the behaviour of five refactoring tools on a well known refactoring, Extract Method, and its implementation for the JAVA language. We distill the lessons learned from our evaluation into requirements that have to be taken into account by refactoring tools in order to fully conform to this new language feature.","PeriodicalId":307062,"journal":{"name":"2010 14th European Conference on Software Maintenance and Reengineering","volume":"19 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2010-03-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2010 14th European Conference on Software Maintenance and Reengineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CSMR.2010.38","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

Abstract

The addition of support for genericity to mainstream programming languages has a notable influence in refactoring tools. This also applies to the JAVA programming language. Those versions of the language specification prior to JAVA 5 did not include support for generics. Therefore, refactoring tools had to evolve to modify their refactoring implementations according to the new language characteristics in order to assure the correct effects when transforming code containing generic definitions or using generic instantiations. This paper presents an evaluation of the behaviour of refactoring tools on source code that defines or uses generics. We compare the behaviour of five refactoring tools on a well known refactoring, Extract Method, and its implementation for the JAVA language. We distill the lessons learned from our evaluation into requirements that have to be taken into account by refactoring tools in order to fully conform to this new language feature.
在JAVA中重构泛型:以抽取方法为例
主流编程语言对泛型的支持对重构工具产生了显著的影响。这也适用于JAVA编程语言。在JAVA 5之前的语言规范版本不包括对泛型的支持。因此,重构工具必须根据新的语言特征来改进它们的重构实现,以便在转换包含泛型定义或使用泛型实例化的代码时确保正确的效果。本文对重构工具在定义或使用泛型的源代码上的行为进行了评估。我们比较了五种重构工具在一个著名的重构上的行为,提取方法,以及它在JAVA语言中的实现。为了完全符合这个新的语言特性,我们将从评估中获得的经验提炼成重构工具必须考虑的需求。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信