Evaluating Domain-Specific Metric Thresholds: An Empirical Study

Software metrics and thresholds provide means to quantify several quality attributes of software systems. Indeed, they have been used in a wide variety of methods and tools for detecting different sorts of technical debts, such as code smells. Unfortunately, these methods and tools do not take into account characteristics of software domains, as the intrinsic complexity of geo-localization and scientific software systems or the simple protocols employed by messaging applications. Instead, they rely on generic thresholds that are derived from heterogeneous systems. Although derivation of reliable thresholds has long been a concern, we still lack empirical evidence about threshold variation across distinct software domains. To tackle this limitation, this paper investigates whether and how thresholds vary across domains by presenting a large-scale study on 3,107 software systems from 15 domains. We analyzed the derivation and distribution of thresholds based on 8 well-known source code metrics. As a result, we observed that software domain and size are relevant factors to be considered when building benchmarks for threshold derivation. Moreover, we also observed that domain-specific metric thresholds are more appropriated than generic ones for code smell detection.

[1]  Alessandro F. Garcia,et al.  JSpIRIT: a flexible tool for the analysis of code smells , 2015, 2015 34th International Conference of the Chilean Computer Science Society (SCCC).

[2]  Marco Tulio Valente,et al.  Extracting relative thresholds for source code metrics , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[3]  Mika Mäntylä,et al.  Code Smell Detection: Towards a Machine Learning-Based Approach , 2013, 2013 IEEE International Conference on Software Maintenance.

[4]  Cláudio Sant'Anna,et al.  On the Effectiveness of Concern Metrics to Detect Code Smells: An Empirical Study , 2014, CAiSE.

[5]  Diomidis Spinellis A tale of four kernels , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[6]  Michele Marchesi,et al.  Power-Laws in a Large Object-Oriented Software System , 2007, IEEE Transactions on Software Engineering.

[7]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[8]  Premkumar T. Devanbu,et al.  A large scale study of programming languages and code quality in github , 2014, SIGSOFT FSE.

[9]  Barbara Kitchenham,et al.  What's up with software metrics? - A preliminary mapping study , 2010, J. Syst. Softw..

[10]  Stéphane Ducasse,et al.  Object-Oriented Metrics in Practice , 2005 .

[11]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[12]  Emerson R. Murphy-Hill,et al.  Cowboys, ankle sprains, and keepers of quality: how is video game development different from software development? , 2014, ICSE.

[13]  Mark Lorenz,et al.  Object-oriented software metrics - a practical guide , 1994 .

[14]  Eduardo Figueiredo,et al.  TDTool: threshold derivation tool , 2016, EASE.

[15]  Mirko Perkusich,et al.  A Bayesian network approach to assist on the interpretation of software metrics , 2015, SAC.

[16]  Forrest Shull,et al.  Building empirical support for automated code smell detection , 2010, ESEM '10.

[17]  Yann-Gaël Guéhéneuc,et al.  Domain matters: bringing further evidence of the relationships among anti-patterns, application domains, and quality-related metrics in Java mobile apps , 2014, ICPC 2014.

[18]  Eduardo Figueiredo,et al.  Defining metric thresholds for software product lines: a comparative study , 2015, SPLC.

[19]  B. F. Castro Buschmann, Frank; Meunier, Regine; Rohnert, Hans; Sommerlad, Peter; Stal, Michael. Pattern-oriented software architecture: a system of patterns, John Wiley & Sons Ltd, 1996 , 1997 .

[20]  Jaejoon Lee,et al.  No Code Anomaly is an Island - Anomaly Agglomeration as Sign of Product Line Instabilities , 2017, ICSR.

[21]  Eduardo Figueiredo,et al.  A review-based comparative study of bad smell detection tools , 2016, EASE.

[22]  Alessandro F. Garcia,et al.  Code Anomalies Flock Together: Exploring Code Anomaly Agglomerations for Locating Design Problems , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[23]  Tiago L. Alves,et al.  Deriving metric thresholds from benchmark data , 2010, 2010 IEEE International Conference on Software Maintenance.

[24]  Radu Marinescu,et al.  Detection strategies: metrics-based rules for detecting design flaws , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[25]  Douglas W. Hubbard,et al.  How to Measure Anything: Finding the Value of "Intangibles" in Business , 2007 .

[26]  Marco Tulio Valente,et al.  RTTool: A Tool for Extracting Relative Thresholds for Source Code Metrics , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[27]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[28]  Jens Grabowski,et al.  Calculation and optimization of thresholds for sets of software metrics , 2011, Empirical Software Engineering.

[29]  Davood Mazinanian,et al.  JDeodorant: Clone Refactoring , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering Companion (ICSE-C).

[30]  Roberto da Silva Bigonha,et al.  Identifying thresholds for object-oriented software metrics , 2012, J. Syst. Softw..

[31]  B. J. Ferro Castro,et al.  Pattern-Oriented Software Architecture: A System of Patterns , 2009 .

[32]  Paul W. Oman,et al.  The application of software maintainability models in industrial software systems , 1995, J. Syst. Softw..

[33]  Jing Li,et al.  The Qualitas Corpus: A Curated Collection of Java Code for Empirical Studies , 2010, 2010 Asia Pacific Software Engineering Conference.

[34]  Tom DeMarco,et al.  Controlling Software Projects: Management, Measurement, and Estimates , 1986 .