Assessing the Bug-Proneness of Refactored Code: A Longitudinal Multi-Project Study. Ferreira, I., Arkoh, L., Uchôa, A., Bibiano, A. C., Garcia, A., & Assunção, W. K. G. In Proceedings of the 29th International Conference on Evaluation and Assessment in Software Engineering (EASE), 2025, Istanbul,Turkey,17-20 June 2025, pages 1–12, 2025.
Paper doi abstract bibtex Refactoring is a common practice in software development, aimed at improving the internal code structure in order to make it easier to understand and modify. Consequently, it is often assumed that refactoring makes the code less prone to bugs. However, in practice, refactoring is a complex task and applied in different ways (e.g., various refactoring types, single vs. composite refactorings) and with a variety of purposes (e.g., root-canal vs. floss refactoring). Therefore, certain refactorings can inadvertently make the code more prone to bugs. Unfortunately, there is limited research in the literature on the long-term relationship between the different characteristics of refactorings and bugs. This paper presents a longitudinal study of 12 open source software projects, where 27,450 refactorings, 1,033 reported bugs, and 6,219 bugs detected with static analysis tools were analyzed. While our study confirms the common intuition that refactored code is less bug-prone than non-refactored code, we also extend or contradict existing body of knowledge in other ways. First, a code element that undergoes multiple refactorings is not less bug-prone than an element that undergoes a single refactoring. A single refactoring is the one not performed in conjunction with other refactorings in the same commit. Second, single refactorings often induce the occurrence of bugs across all analyzed projects. Third, code elements affected by refactorings made in conjunction with other non-refactoring changes in the same commit (i.e., floss refactorings) are often bug-prone. Finally, many of such bugs induced by refactoring cannot be revealed with state-of-the-art techniques for detecting behavior-preserving refactorings.
@inproceedings{ferreira2025assessing,
title={Assessing the Bug-Proneness of Refactored Code: A Longitudinal Multi-Project Study},
author={Isabella Ferreira and Lawrence Arkoh and Anderson Uchôa and Ana Carla Bibiano and Alessandro Garcia and Wesley K. G. Assunção},
booktitle={Proceedings of the 29th International Conference on Evaluation and Assessment in Software Engineering (EASE), 2025, Istanbul,Turkey,17-20 June 2025},
pages={1--12},
year={2025},
abstract={Refactoring is a common practice in software development, aimed at improving the internal code structure in order to make it easier to understand and modify. Consequently, it is often assumed that refactoring makes the code less prone to bugs. However, in practice, refactoring is a complex task and applied in different ways (e.g., various refactoring types, single vs. composite refactorings) and with a variety of purposes (e.g., root-canal vs. floss refactoring). Therefore, certain refactorings can inadvertently make the code more prone to bugs. Unfortunately, there is limited research in the literature on the long-term relationship between the different characteristics of refactorings and bugs. This paper presents a longitudinal study of 12 open source software projects, where 27,450 refactorings, 1,033 reported bugs, and 6,219 bugs detected with static analysis tools were analyzed. While our study confirms the common intuition that refactored code is less bug-prone than non-refactored code, we also extend or contradict existing body of knowledge in other ways. First, a code element that undergoes multiple refactorings is not less bug-prone than an element that undergoes a single refactoring. A single refactoring is the one not performed in conjunction with other refactorings in the same commit. Second, single refactorings often induce the occurrence of bugs across all analyzed projects. Third, code elements affected by refactorings made in conjunction with other non-refactoring changes in the same commit (i.e., floss refactorings) are often bug-prone. Finally, many of such bugs induced by refactoring cannot be revealed with state-of-the-art techniques for detecting behavior-preserving refactorings.},
doi = {10.1145/3756681.3756948},
url = {https://doi.org/10.1145/3756681.3756948},
}
Downloads: 0
{"_id":"vGTEWoCqz66axNxKw","bibbaseid":"ferreira-arkoh-ucha-bibiano-garcia-assuno-assessingthebugpronenessofrefactoredcodealongitudinalmultiprojectstudy-2025","author_short":["Ferreira, I.","Arkoh, L.","Uchôa, A.","Bibiano, A. C.","Garcia, A.","Assunção, W. K. G."],"bibdata":{"bibtype":"inproceedings","type":"inproceedings","title":"Assessing the Bug-Proneness of Refactored Code: A Longitudinal Multi-Project Study","author":[{"firstnames":["Isabella"],"propositions":[],"lastnames":["Ferreira"],"suffixes":[]},{"firstnames":["Lawrence"],"propositions":[],"lastnames":["Arkoh"],"suffixes":[]},{"firstnames":["Anderson"],"propositions":[],"lastnames":["Uchôa"],"suffixes":[]},{"firstnames":["Ana","Carla"],"propositions":[],"lastnames":["Bibiano"],"suffixes":[]},{"firstnames":["Alessandro"],"propositions":[],"lastnames":["Garcia"],"suffixes":[]},{"firstnames":["Wesley","K.","G."],"propositions":[],"lastnames":["Assunção"],"suffixes":[]}],"booktitle":"Proceedings of the 29th International Conference on Evaluation and Assessment in Software Engineering (EASE), 2025, Istanbul,Turkey,17-20 June 2025","pages":"1–12","year":"2025","abstract":"Refactoring is a common practice in software development, aimed at improving the internal code structure in order to make it easier to understand and modify. Consequently, it is often assumed that refactoring makes the code less prone to bugs. However, in practice, refactoring is a complex task and applied in different ways (e.g., various refactoring types, single vs. composite refactorings) and with a variety of purposes (e.g., root-canal vs. floss refactoring). Therefore, certain refactorings can inadvertently make the code more prone to bugs. Unfortunately, there is limited research in the literature on the long-term relationship between the different characteristics of refactorings and bugs. This paper presents a longitudinal study of 12 open source software projects, where 27,450 refactorings, 1,033 reported bugs, and 6,219 bugs detected with static analysis tools were analyzed. While our study confirms the common intuition that refactored code is less bug-prone than non-refactored code, we also extend or contradict existing body of knowledge in other ways. First, a code element that undergoes multiple refactorings is not less bug-prone than an element that undergoes a single refactoring. A single refactoring is the one not performed in conjunction with other refactorings in the same commit. Second, single refactorings often induce the occurrence of bugs across all analyzed projects. Third, code elements affected by refactorings made in conjunction with other non-refactoring changes in the same commit (i.e., floss refactorings) are often bug-prone. Finally, many of such bugs induced by refactoring cannot be revealed with state-of-the-art techniques for detecting behavior-preserving refactorings.","doi":"10.1145/3756681.3756948","url":"https://doi.org/10.1145/3756681.3756948","bibtex":"@inproceedings{ferreira2025assessing,\n title={Assessing the Bug-Proneness of Refactored Code: A Longitudinal Multi-Project Study},\n author={Isabella Ferreira and Lawrence Arkoh and Anderson Uchôa and Ana Carla Bibiano and Alessandro Garcia and Wesley K. G. Assunção},\n booktitle={Proceedings of the 29th International Conference on Evaluation and Assessment in Software Engineering (EASE), 2025, Istanbul,Turkey,17-20 June 2025},\n pages={1--12},\n year={2025},\n abstract={Refactoring is a common practice in software development, aimed at improving the internal code structure in order to make it easier to understand and modify. Consequently, it is often assumed that refactoring makes the code less prone to bugs. However, in practice, refactoring is a complex task and applied in different ways (e.g., various refactoring types, single vs. composite refactorings) and with a variety of purposes (e.g., root-canal vs. floss refactoring). Therefore, certain refactorings can inadvertently make the code more prone to bugs. Unfortunately, there is limited research in the literature on the long-term relationship between the different characteristics of refactorings and bugs. This paper presents a longitudinal study of 12 open source software projects, where 27,450 refactorings, 1,033 reported bugs, and 6,219 bugs detected with static analysis tools were analyzed. While our study confirms the common intuition that refactored code is less bug-prone than non-refactored code, we also extend or contradict existing body of knowledge in other ways. First, a code element that undergoes multiple refactorings is not less bug-prone than an element that undergoes a single refactoring. A single refactoring is the one not performed in conjunction with other refactorings in the same commit. Second, single refactorings often induce the occurrence of bugs across all analyzed projects. Third, code elements affected by refactorings made in conjunction with other non-refactoring changes in the same commit (i.e., floss refactorings) are often bug-prone. Finally, many of such bugs induced by refactoring cannot be revealed with state-of-the-art techniques for detecting behavior-preserving refactorings.},\n doi = {10.1145/3756681.3756948},\n url = {https://doi.org/10.1145/3756681.3756948},\n}\n\n","author_short":["Ferreira, I.","Arkoh, L.","Uchôa, A.","Bibiano, A. C.","Garcia, A.","Assunção, W. K. G."],"key":"ferreira2025assessing","id":"ferreira2025assessing","bibbaseid":"ferreira-arkoh-ucha-bibiano-garcia-assuno-assessingthebugpronenessofrefactoredcodealongitudinalmultiprojectstudy-2025","role":"author","urls":{"Paper":"https://doi.org/10.1145/3756681.3756948"},"metadata":{"authorlinks":{}}},"bibtype":"inproceedings","biburl":"https://anderson-uchoa.github.io/publications/UchoaPapers.bib","dataSources":["DrgHbRMTxYfvfLLF5"],"keywords":[],"search_terms":["assessing","bug","proneness","refactored","code","longitudinal","multi","project","study","ferreira","arkoh","uchôa","bibiano","garcia","assunção"],"title":"Assessing the Bug-Proneness of Refactored Code: A Longitudinal Multi-Project Study","year":2025}