Blanker: A Refactor-Oriented Cloned Source Code Normalizer

Davide Pizzolotto, Katsuro Inoue
{"title":"Blanker: A Refactor-Oriented Cloned Source Code Normalizer","authors":"Davide Pizzolotto, Katsuro Inoue","doi":"10.1109/IWSC50091.2020.9047634","DOIUrl":null,"url":null,"abstract":"Refactoring is widely practiced by developers and has become a key factor in order to increase the maintainability of software. However, code clones pose a threat in any refactor process due to the fact that a developer should edit identical portions of code more than once. Despite the numerous researches in this topic, most of the results are focused on discovering type-3 and type-4 clones, that require an higher effort to be refactored and removed. In this paper we present our tool, Blanker, that searches and unifies equivalent statements available in the language before feeding the source to an existing code clone detector limited to type-2 clones. This step acts as a normalization step and produces refactorable results without the error introduced by potentially unrelated added statements (like in type-3 clones), that would be unsuitable for refactoring purposes, and with added flexibility compared to checking for identical code portions (like in type-2 clones). We used NiCad to detect clones before and after our normalization step and found up to 10% more type-2 clones after our normalization, all of them being refactor candidates.","PeriodicalId":127830,"journal":{"name":"2020 IEEE 14th International Workshop on Software Clones (IWSC)","volume":"34 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-02-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 IEEE 14th International Workshop on Software Clones (IWSC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/IWSC50091.2020.9047634","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

Abstract

Refactoring is widely practiced by developers and has become a key factor in order to increase the maintainability of software. However, code clones pose a threat in any refactor process due to the fact that a developer should edit identical portions of code more than once. Despite the numerous researches in this topic, most of the results are focused on discovering type-3 and type-4 clones, that require an higher effort to be refactored and removed. In this paper we present our tool, Blanker, that searches and unifies equivalent statements available in the language before feeding the source to an existing code clone detector limited to type-2 clones. This step acts as a normalization step and produces refactorable results without the error introduced by potentially unrelated added statements (like in type-3 clones), that would be unsuitable for refactoring purposes, and with added flexibility compared to checking for identical code portions (like in type-2 clones). We used NiCad to detect clones before and after our normalization step and found up to 10% more type-2 clones after our normalization, all of them being refactor candidates.
Blanker:一个面向重构的克隆源代码规范器
重构被开发人员广泛实践,并且已经成为提高软件可维护性的一个关键因素。然而,代码克隆在任何重构过程中都构成威胁,因为开发人员应该多次编辑相同的代码部分。尽管在这个主题中有大量的研究,但大多数结果都集中在发现类型3和类型4的克隆上,这需要更高的努力来重构和删除。在本文中,我们介绍了我们的工具Blanker,它在将源代码提供给现有的限于类型2克隆的代码克隆检测器之前,搜索并统一语言中可用的等效语句。此步骤作为规范化步骤,产生可重构的结果,而不会出现不相关的添加语句(如在type-3克隆中)引入的错误,这些语句不适合用于重构目的,并且与检查相同的代码部分(如在type-2克隆中)相比,具有更高的灵活性。我们使用NiCad检测归一化步骤前后的克隆,并在归一化之后发现多达10%的类型-2克隆,它们都是重构候选。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信