Liebig, JörgApel, SvenJanker, AndreasGarbe, FlorianOster, SebastianKnoop, JensZdun, Uwe2017-06-212017-06-212016978-3-88579-646-6Today, many software systems are configurable with conditional compilation. Just like any software system, configurable systems need to be refactored during their evolution. The inherent variability of configurable systems induces an additional dimension of complexity that is not addressed properly by current academic and industrial refactoring engines. Even simple refactorings, such as RENAME IDENTIFIER, are not handled well by existing refactoring engines and may introduce errors in some variants of the configurable system to be refactored. To improve the state of the art, we propose a variability-aware refactoring approach that relies on a canonical variability representation and variability-aware analysis. The goal is to preserve the behavior of all variants of the configurable system, without compromising general applicability and scalability. To demonstrate practicality, we developed MORPHEUS, a sound variability-aware refactoring engine for C code with preprocessor directives. We applied MORPHEUS to three substantial real-world systems (Busybox, OpenSSL, and SQLite) showing that variability-aware refactoring is practical (i.e., scalable, sound, and complete) in the presence of conditional compilation.enMorpheus: variability-aware refactoring in the wildText/Conference Paper1617-5468