Is Refactoring Always a Good Egg? Exploring the Interconnection Between Bugs and Refactorings
Bug fixing and code refactoring are two distinct maintenance actions with different goals. While bug fixing is a corrective change that eliminates a defect from the program, refactoring targets improving the internal quality (i.e., maintainability) of a software system without changing its functionality. Best practices and common intuition suggest that these code actions should not be mixed in a single code change. Furthermore, as refactoring aims for improving quality without functional changes, we would expect that refactoring code changes will not be sources of bugs. Nonetheless, empirical studies show that none of the above hypotheses are necessarily true in practice. In this paper, we empirically investigate the interconnection between bug-related and refactoring code changes using the SmartSHARK dataset. Our goal is to explore how often bug fixes and refactorings co-occur in a single commit (tangled changes) and whether refactoring changes themselves might induce bugs into the system. We found that it is not uncommon to have tangled commits of bug fixes and refactorings; 21% of bug-fixing commits include at least one type of refactoring on average. What is even more shocking is that 54% of bug-inducing commits also contain code refactoring changes. For instance, 10% (652 occurrences) of the Change Variable Type refactorings in the dataset appear in bug-inducing commits that make up 7.9% of the total inducing commits.
Is Refactoring Always a Good Egg? Exploring the Interconnection Between Bugs and Refactorings (presentation-amirreza-bagheri.wmv) | 13.71MiB |
Wed 18 MayDisplayed time zone: Eastern Time (US & Canada) change
12:00 - 12:50 | Mining ChallengeMining Challenge / Technical Papers at MSR Main room - even hours Chair(s): Steffen Herbold TU Clausthal | ||
12:00 4mTalk | An Exploratory Study on Refactoring Documentation in Issues Handling Mining Challenge Eman Abdullah AlOmar Stevens Institute of Technology, Anthony Peruma Rochester Institute of Technology, Mohamed Wiem Mkaouer Rochester Institute of Technology, Christian D. Newman Rochester Institute of Technology, Ali Ouni ETS Montreal, University of Quebec Pre-print | ||
12:04 4mTalk | Between JIRA and GitHub: ASFBot and its Influence on Human Comments in Issue Trackers Mining Challenge Ambarish Moharil Eindhoven University of Technology, Dmitrii Orlov Eindhoven University of Technology, Samar Jameel Eindhoven University of Technology, Tristan Trouwen Eindhoven University of Technology, Nathan Cassee Eindhoven University of Technology, Alexander Serebrenik Eindhoven University of Technology Pre-print | ||
12:08 4mTalk | Is Refactoring Always a Good Egg? Exploring the Interconnection Between Bugs and Refactorings Mining Challenge File Attached | ||
12:12 4mTalk | On the Co-Occurrence of Refactoring of Test and Source Code Mining Challenge Pre-print Media Attached | ||
12:16 4mTalk | Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship Between Technical Debt and RefactoringBest Mining Challenge Paper Award Mining Challenge Anthony Peruma Rochester Institute of Technology, Eman Abdullah AlOmar Stevens Institute of Technology, Christian D. Newman Rochester Institute of Technology, Mohamed Wiem Mkaouer Rochester Institute of Technology, Ali Ouni ETS Montreal, University of Quebec Pre-print Media Attached | ||
12:20 4mTalk | Studying the Impact of Continuous Delivery Adoption on Bug-Fixing Time in Apache’s Open-Source Projects Mining Challenge Carlos Diego Andrade de Almeida Federal University of Ceará, Diego N. Feijó Federal University of Ceará, Lincoln Rocha Federal University of Ceará Media Attached | ||
12:24 4mTalk | Which bugs are missed in code reviews: An empirical study on SmartSHARK dataset Mining Challenge fatemeh khoshnoud Department of Computer Science and Engineering and IT; School of Electrical and Computer Engineering, Shiraz University, Ali Rezaei Nasab Department of Computer Science and Engineering and IT; School of Electrical and Computer Engineering, Shiraz University, Zahra Toudeji Department of Computer Science and Engineering and IT; School of Electrical and Computer Engineering, Shiraz University, Ashkan Sami Shiraz University | ||
12:28 22mLive Q&A | Discussions and Q&A Technical Papers |