Capture the Feature Flag: Detecting Feature Flags in Open-Source

kaestner@cs.cmu.edu (J. Meinicke, J. Rentería, C. Kästner, B. Vasilescu)
Fri, 18 Dec 2020 14:59:06 -0500

Jens Meinicke, Juan David Hoyos Rentería, Christian Kästner, and Bogdan Vasilescu. Capture the Feature Flag: Detecting Feature Flags in Open-Source. In Proceedings of the 18th International Conference on Mining Software Repositories (MSR), pages 169--173, New York, NY: ACM Press, May 2020.

Feature flags (a.k.a feature toggles) are a mechanism to keep new features hidden behind a boolean option during development. Flags are used for many purposes, such as A/B testing and turning off a feature more easily in case of failures. While software engineering feature flags research is burgeoning, examples of software projects using flags rarely come from outside commercial and private projects, stifling academic progress. To address this gap, in this paper we present a novel mining software repositories approach to detect feature flagging open-source projects, based on analyzing the projects' commit messages. We apply our approach to all open-source GitHub projects, identifying 231,223 candidate feature flagging projects, and manually validating 100. We also report on an initial analysis of feature flags in the validated sample of 100 projects, investigating practices that correlate with shorter flag lifespans (typically desirable to reduce technical debt), such as using the issue tracker and having the flag owner (the developer introducing a flag) also be the one removing it.