When code smells twice as much: Metric-based detection of variability-aware code smells

Wolfram Fenske, Sandro Schulze, Daniel Meyer, Gunter Saake
2015 2015 IEEE 15th International Working Conference on Source Code Analysis and Manipulation (SCAM)  
Code smells are established, widely used characterizations of shortcomings in design and implementation of software systems. As such, they have been subject to intensive research regarding their detection and impact on understandability and changeability of source code. However, current methods do not support highly configurable software systems, that is, systems that can be customized to fit a wide range of requirements or platforms. Such systems commonly owe their configurability to
more » ... l compilation based on C preprocessor annotations (a. k. a. #ifdefs). Since annotations directly interact with the host language (e. g., C), they may have adverse effects on understandability and changeability of source code, referred to as variability-aware code smells. In this paper, we propose a metricbased method that integrates source code and C preprocessor annotations to detect such smells. We evaluate our method for one specific smell on five open-source systems of medium size, thus, demonstrating its general applicability. Moreover, we manually reviewed 100 instances of the smell and provide a qualitative analysis of its potential impact as well as common causes for the occurrence. 978-1-4673-7529-0/15 c 2015 IEEE SCAM 2015, Bremen, Germany Accepted for publication by IEEE. c 2015 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/ republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
doi:10.1109/scam.2015.7335413 dblp:conf/scam/FenskeSMS15 fatcat:xm3cb6x2svhwxc3lyns7luq3wq