Towards the Definition of Domain-Specific Thresholds

  • Allan Mori Universidade Federal de Minas Gerais
  • Eduardo Figueiredo Universidade Federal de Minas Gerais
  • Elder Cirilo Universidade Federal de São João Del Rei


Software metrics provide basic means to quantify several quality aspects of information systems. However, the effectiveness of the measurement process is directly dependent on the definition of reliable thresholds. To define appropriate thresholds, we need to consider characteristics of the information systems, such as their size and domain. There are several studies to propose methods to derive thresholds and evaluate them. However, we still lack empirical knowledge about whether and how thresholds vary across different information system domains. To tackle this limitation, this paper investigates specific thresholds in four information system domains: accounting, e-commerce, health, and restaurant. Our study relies on 40 information systems to derive domain-specific thresholds for 9 well-known software metrics. Our results indicate that lower-bound thresholds (e.g., 15% smaller classes) usually do not significantly vary across domains. However, for all analyzed metrics, upper-bound thresholds (e.g., 5% largest classes) are different in some domains. Moreover, our study also suggests that domain-specific thresholds are more appropriated than generic ones. For instance, we observed in our analysis that the more appropriated threshold to select the 5% largest classes is 290 LOC in health systems and 147 LOC in accounting systems.

Palavras-chave: Métricas de Software, Limiares, Domínio de Software


L. Amorim, E. Costa, N. Antunes, B. Fonseca, and M. Ribeiro. Experience report: Evaluating the effectiveness of decision trees for detecting code smells. In 26th Int’l Symposium on Software Reliability Engineering (ISSRE), pp.261-269, 2015.

C. Bastos, P. A. Junior, and H. Costa. Detection techniques of dead code: Systematic literature review. In XII Brazilian Symposium on Information Systems (SBSI), pp.255-262, 2016.

J. P. d. Reis, F. B. e Abreu, and G. d. F. Carneiro. Code smells incidence: Does it depend on the application domain? In 10th Int’l Conf. on the Quality of Information and Communications Technology (QUATIC), pp.172-177, 2016.

E. Fernandes, J. Oliveira, G. Vale, T. Paiva, and E. Figueiredo. A review-based comparative study of bad smell detection tools. In 20th Int’l Conf. on Evaluation and Assessment in Software Engineering (EASE), pp.1-12, 2016.

F. A. Fontana, V. Ferme, A. Marino, B. Walter, and P. Martenka. Investigating the impact of code smells on system’s quality: An empirical study on systems of different application domains. In 29th Int’l Conf. on Software Maintenance and Evolution (ICSME), pp.260-269, 2013.

F. A. Fontana, E. Mariani, A. Mornioli, R. Sormani, and A. Tonello. An experience report on using code smells detection tools. In 4th Int’l Conf. on Software Testing, Verification and Validation Workshops (ICSTW). Computer Society, pp.450-457, 2011.

M. Fowler and K. Beck. Refactoring: Improving the Design of Existing Code. Component software series. Addison-Wesley, 1999.

Y. Guo, C. Seaman, N. Zazworka, and F. Shull. Domain-specific tailoring of code smells: an empirical study. In 32nd Int’l Conf. on Software Engineering (ICSE), pp.167-170, 2010.

Y. Khrishe and M. Alshayeb. An empirical study on the effect of the order of applying software refactoring. In 7th Int’l Conf. on Computer Science and Information Technology (CSIT), pp.1-4, 2016.

R. Komondoor and S. Horwitz. Using slicing to identify duplication in source code. In 8th Int’l Symposium on Static Analysis (SAS), pp.40-56, 2001.

J. Krinke. Identifying similar code with program dependence graphs. In 8th Working Conf. on Reverse Engineering (WCRE), pp.301-310, 2001.

M. Lanza and R. Marinescu. Object-Oriented Metrics in Practice: Using Software Metrics to Characterize, Evaluate, and Improve the Design of Object-Oriented Systems. Springer Publishing Company, Incorporated, 2010.

M. Linares-Vásquez, S. Klock, C. McMillan, A. Sabané, D. Poshyvanyk, and Y.-G. Guéhéneuc. Domain matters: Bringing further evidence of the relationships among anti-patterns, application domains, and quality-related metrics in java mobile apps. In 22th Int’l Conf. on Program Comprehension (ICPC). ACM, pp.232-243, 2004.

H. Liu, Z. Ma, W. Shao, and Z. Niu. Schedule of bad smell detection and resolution: A new way to save effort. Transactions on Software Engineering (TSE), (1), pp.220-235, 2012.

W. Ma, L. Chen, Y. Zhou, and B. Xu. Do we have a chance to fix bugs when refactoring code smells? In Int’l Conf. on Software Analysis, Testing and Evolution (SATE), pp.24-29, 2016.

R. Marinescu. Detection strategies: Metrics-based rules for detecting design flaws. In 20th Int’l Conf. on Software Maintenance (ICSM), pp.350-359, 2004.

N. Moha, Y. g. Gueheneuc, and P. Leduc. Automatic generation of detection algorithms for design defects. In 21st Int’l Conf. on Automated Software Engineering (ASE), pp.297-300, 2006.

F. Palomba, G. Bavota, M. D. Penta, R. Oliveto, A. D. Lucia, and D. Poshyvanyk. Detecting bad smells in source code using change history information. In 28th Int’l Conf. on Automated Software Engineering (ASE), pp.268-278, 2013.

J. Pérez and Y. Crespo. Perspectives on automated correction of bad smells. In Joint Int’l Workshop on Principles of Software Evolution (IWPSE). ACM, pp.99-108, 2009.

N. Sae-Lim, S. Hayashi, and M. Saeki. Context-based code smells prioritization for prefactoring. In 24th Int’l Conf. on Program Comprehension (ICPC), pp.1-10, 2016.

E. Tempero, C. Anslow, J. Dietrich, T. Han, J. Li, M. Lumpe, H. Melton, and J. Noble. Qualitas corpus: A curated collection of java code for empirical studies. In 2010 Asia Pacific Software Engineering Conf. (APSEC2010), pp.336-345, 2010.

N. Tsantalis, T. Chaikalis, and A. Chatzigeorgiou. Jdeodorant: Identification and removal of type-checking bad smells. In 12th European Conf. on Software Maintenance and Reengineering (CSMR), pp.329-331, 2008.

C. Wohlin, P. Runeson, M. HÃűst, M. C. Ohlsson, and B. Regnell. Experimentation in Software Engineering. Springer, 2012.

S. Wong, Y. Cai, M. Kim, and M. Dalton. Detecting software modularity violations. In 33rd Int’l Conf. on Software Engineering (ICSE), pp.411-420, 2011.
Como Citar

Selecione um Formato
MORI, Allan; FIGUEIREDO, Eduardo; CIRILO, Elder. Towards the Definition of Domain-Specific Thresholds. In: SIMPÓSIO BRASILEIRO DE SISTEMAS DE INFORMAÇÃO (SBSI), 13. , 2017, Lavras. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2017 . p. 404-411. DOI: