代码重构中有bug的一面:理解重构和bug之间的关系

Isabella Ferreira, Eduardo Fernandes, Diego Cedrim, Anderson G. Uchôa, Ana Carla Bibiano, Alessandro F. Garcia, J. Correia, Filipe Santos, Gabriel Nunes, Caio Barbosa, B. Neto, R. Mello
{"title":"代码重构中有bug的一面:理解重构和bug之间的关系","authors":"Isabella Ferreira, Eduardo Fernandes, Diego Cedrim, Anderson G. Uchôa, Ana Carla Bibiano, Alessandro F. Garcia, J. Correia, Filipe Santos, Gabriel Nunes, Caio Barbosa, B. Neto, R. Mello","doi":"10.1145/3183440.3195030","DOIUrl":null,"url":null,"abstract":"Code refactoring is widely practiced by software developers. There is an explicit assumption that code refactoring improves the structural quality of a software project, thereby also reducing its bug proneness. However, refactoring is often applied with different purposes in practice. Depending on the complexity of certain refactorings, developers might unconsciously make the source code more susceptible to have bugs. In this paper, we present a longitudinal study of 5 Java open source projects, where 20,689 refactorings, and 1,033 bug reports were analyzed. We found that many bugs are introduced in the refactored code as soon as the first immediate change is made on it. Furthermore, code elements affected by refactorings performed in conjunction with other changes are more prone to have bugs than those affected by pure refactorings.","PeriodicalId":121436,"journal":{"name":"Proceedings of the 40th International Conference on Software Engineering: Companion Proceeedings","volume":"23 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-05-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"11","resultStr":"{\"title\":\"The buggy side of code refactoring: understanding the relationship between refactorings and bugs\",\"authors\":\"Isabella Ferreira, Eduardo Fernandes, Diego Cedrim, Anderson G. Uchôa, Ana Carla Bibiano, Alessandro F. Garcia, J. Correia, Filipe Santos, Gabriel Nunes, Caio Barbosa, B. Neto, R. Mello\",\"doi\":\"10.1145/3183440.3195030\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Code refactoring is widely practiced by software developers. There is an explicit assumption that code refactoring improves the structural quality of a software project, thereby also reducing its bug proneness. However, refactoring is often applied with different purposes in practice. Depending on the complexity of certain refactorings, developers might unconsciously make the source code more susceptible to have bugs. In this paper, we present a longitudinal study of 5 Java open source projects, where 20,689 refactorings, and 1,033 bug reports were analyzed. We found that many bugs are introduced in the refactored code as soon as the first immediate change is made on it. Furthermore, code elements affected by refactorings performed in conjunction with other changes are more prone to have bugs than those affected by pure refactorings.\",\"PeriodicalId\":121436,\"journal\":{\"name\":\"Proceedings of the 40th International Conference on Software Engineering: Companion Proceeedings\",\"volume\":\"23 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2018-05-27\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"11\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 40th International Conference on Software Engineering: Companion Proceeedings\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3183440.3195030\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 40th International Conference on Software Engineering: Companion Proceeedings","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3183440.3195030","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 11

摘要

代码重构被软件开发人员广泛实践。有一个明确的假设,即代码重构提高了软件项目的结构质量,从而也减少了它的bug倾向。然而,在实践中,重构常常被用于不同的目的。根据某些重构的复杂性,开发人员可能会无意识地使源代码更容易出现错误。在本文中,我们对5个Java开源项目进行了纵向研究,其中分析了20,689个重构和1,033个bug报告。我们发现,一旦对重构后的代码进行了第一次直接更改,就会引入许多bug。此外,受与其他更改一起执行的重构影响的代码元素比受纯粹重构影响的代码元素更容易产生bug。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
The buggy side of code refactoring: understanding the relationship between refactorings and bugs
Code refactoring is widely practiced by software developers. There is an explicit assumption that code refactoring improves the structural quality of a software project, thereby also reducing its bug proneness. However, refactoring is often applied with different purposes in practice. Depending on the complexity of certain refactorings, developers might unconsciously make the source code more susceptible to have bugs. In this paper, we present a longitudinal study of 5 Java open source projects, where 20,689 refactorings, and 1,033 bug reports were analyzed. We found that many bugs are introduced in the refactored code as soon as the first immediate change is made on it. Furthermore, code elements affected by refactorings performed in conjunction with other changes are more prone to have bugs than those affected by pure refactorings.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信