Refactorings often require semantic correctness conditions that amount to software model checking. However, IDEs such as Eclipse’s Java Development Tools implement far simpler checks on the structure of the code. This leads to the phenomenon that a seemingly innocuous refactoring can change the behaviour of the program. In this paper we demonstrate our technique of introducing runtime checks for two particular refactorings for the Java programming language: Extract And Move Method, and Extract Local Variable. These checks can, in combination with unit tests, detect changed behaviour and allow identification of which specific refactoring step introduced the deviant behaviour.
CITATION STYLE
Eilertsen, A. M., Bagge, A. H., & Stolz, V. (2016). Safer refactorings. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 9952 LNCS, pp. 517–531). Springer Verlag. https://doi.org/10.1007/978-3-319-47166-2_36
Mendeley helps you to discover research relevant for your work.