In order to increase the maintainability and the flexibility of a software, its design and implementation quality must be properly assessed. For this purpose a large number of metrics and several higher-level mechanisms based on metrics are defined in literature. But the accuracy of these quantification means is heavily dependent on the proper selection of threshold values, which is oftentimes totally empirical and unreliable. In this paper we present a novel method for establishing proper threshold values for metrics-based rules used to detect design flaws in object-oriented systems. The method, metaphorically called "tuning machine", is based on inferring the threshold values based on a set of reference examples, manually classified in "flawed" respectively "healthy" design entities (e.g., classes, methods). More precisely, the "tuning machine" searches, based on a genetic algorithm, for those thresholds which maximize the number of correctly classified entities. The paper also defines a repeatable process for collecting examples, and discusses the encouraging and intriguing results while applying the approach on two concrete metrics-based rules that quantify two well-known design flaws i.e., "God Class" and "Data Class".
Index Terms:
threshold, metrics, design flaws, object-oriented design
Citation:
Petru Florin Mihancea, Radu Marinescu, "Towards the Optimization of Automatic Detection of Design Flaws in Object-Oriented Software Systems," csmr, pp.92-101, Ninth European Conference on Software Maintenance and Reengineering (CSMR'05), 2005