TY - GEN
T1 - Which refactoring reduces bug rate?
AU - Amit, Idan
AU - Feitelson, Dror G.
N1 - Publisher Copyright: © 2019 Copyright held by the owner/author(s).
PY - 2019/9/18
Y1 - 2019/9/18
N2 - We present a methodology to identify refactoring operations that reduce the bug rate in the code. The methodology is based on comparing the bug fixing rate in certain time windows before and after the refactoring. We analyzed 61, 331 refactor commits from 1, 531 large active GitHub projects. When comparing three-month windows, the bug rate is substantially reduced in 17% of the files of analyzed refactors, compared to 12% of the files in random commits. Within this group, implementing 'todo's provides the most benefits. Certain operations like reuse, upgrade, and using enum and namespaces are also especially beneficial.
AB - We present a methodology to identify refactoring operations that reduce the bug rate in the code. The methodology is based on comparing the bug fixing rate in certain time windows before and after the refactoring. We analyzed 61, 331 refactor commits from 1, 531 large active GitHub projects. When comparing three-month windows, the bug rate is substantially reduced in 17% of the files of analyzed refactors, compared to 12% of the files in random commits. Within this group, implementing 'todo's provides the most benefits. Certain operations like reuse, upgrade, and using enum and namespaces are also especially beneficial.
KW - Code quality
KW - Machine learning
KW - Refactoring
UR - https://www.scopus.com/pages/publications/85076092666
U2 - 10.1145/3345629.3345631
DO - 10.1145/3345629.3345631
M3 - Conference contribution
T3 - ACM International Conference Proceeding Series
SP - 12
EP - 15
BT - PROMISE 2019 - 15th International Conference on Predictive Models and Data Analytics in Software Engineering
T2 - 15th International Conference on Predictive Models and Data Analytics in Software Engineering, PROMISE 2019, co-located with the 13th International Symposium on Empirical Software Engineering and Measurement, ESEM 2019
Y2 - 18 September 2019
ER -