使用角色删除代码重复

Fernando Sérgio Barbosa, Ademar Aguiar
{"title":"使用角色删除代码重复","authors":"Fernando Sérgio Barbosa, Ademar Aguiar","doi":"10.1109/SoMeT.2013.6645656","DOIUrl":null,"url":null,"abstract":"The existence of replicated code in a system makes that system harder to maintain and evolve. To remove replicated code the usual way is to use refactorings. However there are always clones that cannot be removed by refactorings alone. Some are due to lack of composition mechanisms in the underlying programming language. We propose the use of roles to remove such clones since roles provide a finer degree of composition. We sketch four role refactorings to remove code clones and apply them in a case study using the JHotDraw framework. Results show that roles have a positive impact in clone reduction as they were able to remove almost all clones traditional refactorings could not.","PeriodicalId":447065,"journal":{"name":"2013 IEEE 12th International Conference on Intelligent Software Methodologies, Tools and Techniques (SoMeT)","volume":"30 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-10-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":"{\"title\":\"Removing Code Duplication with Roles\",\"authors\":\"Fernando Sérgio Barbosa, Ademar Aguiar\",\"doi\":\"10.1109/SoMeT.2013.6645656\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The existence of replicated code in a system makes that system harder to maintain and evolve. To remove replicated code the usual way is to use refactorings. However there are always clones that cannot be removed by refactorings alone. Some are due to lack of composition mechanisms in the underlying programming language. We propose the use of roles to remove such clones since roles provide a finer degree of composition. We sketch four role refactorings to remove code clones and apply them in a case study using the JHotDraw framework. Results show that roles have a positive impact in clone reduction as they were able to remove almost all clones traditional refactorings could not.\",\"PeriodicalId\":447065,\"journal\":{\"name\":\"2013 IEEE 12th International Conference on Intelligent Software Methodologies, Tools and Techniques (SoMeT)\",\"volume\":\"30 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2013-10-24\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"4\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2013 IEEE 12th International Conference on Intelligent Software Methodologies, Tools and Techniques (SoMeT)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/SoMeT.2013.6645656\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2013 IEEE 12th International Conference on Intelligent Software Methodologies, Tools and Techniques (SoMeT)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SoMeT.2013.6645656","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

摘要

系统中复制代码的存在使该系统更难维护和发展。要删除复制的代码,通常的方法是使用重构。然而,总是存在不能仅通过重构来移除的克隆。有些是由于底层编程语言中缺乏组合机制。我们建议使用角色来删除这样的克隆,因为角色提供了更精细的组合。我们概述了四个角色重构,以删除代码克隆,并在使用JHotDraw框架的案例研究中应用它们。结果表明,角色对减少克隆有积极的影响,因为它们能够删除几乎所有传统重构不能删除的克隆。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Removing Code Duplication with Roles
The existence of replicated code in a system makes that system harder to maintain and evolve. To remove replicated code the usual way is to use refactorings. However there are always clones that cannot be removed by refactorings alone. Some are due to lack of composition mechanisms in the underlying programming language. We propose the use of roles to remove such clones since roles provide a finer degree of composition. We sketch four role refactorings to remove code clones and apply them in a case study using the JHotDraw framework. Results show that roles have a positive impact in clone reduction as they were able to remove almost all clones traditional refactorings could not.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信