How preprocessor annotations (do not) affect maintainability: a case study on change-proneness

W Fenske, S Schulze, G Saake - ACM SIGPLAN Notices, 2017 - dl.acm.org
ACM SIGPLAN Notices, 2017dl.acm.org
Preprocessor annotations (eg,# ifdef in C) enable the development of similar, but distinct
software variants from a common code base. One particularly popular preprocessor is the C
preprocessor, cpp. But the cpp is also widely criticized for impeding software maintenance
by making code hard to understand and change. Yet, evidence to support this criticism is
scarce. In this paper, we investigate the relation between cpp usage and maintenance effort,
which we approximate with the frequency and extent of source code changes. To this end …
Preprocessor annotations (e.g., #ifdef in C) enable the development of similar, but distinct software variants from a common code base. One particularly popular preprocessor is the C preprocessor, cpp. But the cpp is also widely criticized for impeding software maintenance by making code hard to understand and change. Yet, evidence to support this criticism is scarce. In this paper, we investigate the relation between cpp usage and maintenance effort, which we approximate with the frequency and extent of source code changes. To this end, we mined the version control repositories of eight open- source systems written in C. For each system, we measured if and how individual functions use cpp annotations and how they were changed. We found that functions containing cpp annotations are generally changed more frequently and more profoundly than other functions. However, when accounting for function size, the differences disappear or are greatly diminished. In summary, with respect to the frequency and extent of changes, our findings do not support the criticism of the cpp regarding maintainability.
ACM Digital Library
Showing the best result for this search. See all results