Skip to main content

An empirical investigation on the relationship between design and architecture smells



Architecture of a software system represents the key design decisions and therefore its quality plays an important role to keep the software maintainable. Code smells are indicators of quality issues in a software system and are classified based on their granularity, scope, and impact. Despite a plethora of existing work on smells, a detailed exploration of architecture smells, their characteristics, and their relationships with smells in other granularities is missing.


The paper aims to study architecture smells characteristics, investigate correlation, collocation, and causation relationships between architecture and design smells.


We implement smell detection support for seven architecture smells. We mine 3 073 open-source repositories containing more than 118 million lines of C# code and empirically investigate the relationships between seven architecture and 19 design smells.


We find that smell density does not depend on repository size. Cumulatively, architecture smells are highly correlated with design smells. Our collocation analysis finds that the majority of design and architecture smell pairs do not exhibit collocation. Finally, our causality analysis reveals that design smells cause architecture smells.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11


  1. 1.

  2. 2.

    In cases where there is no previous work recommending specific threshold values, we chose a value based on our experience in analyzing source code and after experimenting with various threshold values and manually analyzing the resultant set of detected smells.

  3. 3.

  4. 4.

  5. 5.

  6. 6.

  7. 7.

  8. 8.

  9. 9.

  10. 10.

  11. 11.

  12. 12.

  13. 13.

  14. 14.

  15. 15.

  16. 16.


  1. Abbes M, Khomh F, Gueheneuc Y, Antoniol G (2011) An empirical study of the impact of two antipatterns, blob and spaghetti code, on program comprehension. In: 2011 15Th european conference on software maintenance and reengineering, pp 181–190.

  2. Arcelli Fontana F, Mäntylä MV, Zanoni M, Marino A (2016) Comparing and experimenting machine learning techniques for code smell detection. Empir Softw Eng 21(3):1143–1191

    Article  Google Scholar 

  3. Bass L, Clements P, Kazman R (2012) Software Architecture in Practice, 3rd edn, Addison-Wesley Professional

  4. Bavota G, De Lucia A, Di Penta M, Oliveto R, Palomba F (2015) An experimental investigation on the innate relationship between quality and refactoring. J Syst Softw 107:1–14

    Article  Google Scholar 

  5. Behnamghader P, Le DM, Garcia J, Link D, Shahbazian A, Medvidovic N (2017) A large-scale study of architectural evolution in open-source software systems. Empir Softw Eng 22(3):1146–1193.

    Article  Google Scholar 

  6. Besker T, Martini A, Bosch J (2018) Managing architectural technical debt: A unified model and systematic literature review. J Syst Softw 135:1–16.

  7. Bloch J (2008) Effective Java (2nd Edition) (The Java Series), 2 edn. Prentice Hall PTR

  8. Booch G, Rumbaugh J, Jacobson I (1999) The unified modeling language user guide. Addison-wesley, Reading

  9. Brown WJ, Malveau RC, McCormick HWS, Mowbray TJ (1998) Antipatterns: Refactoring Software, Architectures, and Projects in Crisis, 1 edn. Wiley, New York

  10. Chidamber SR, Kemerer CF (1994) A metrics suite for object oriented design. IEEE Trans Softw Eng 20(6):476–493.

    Article  Google Scholar 

  11. Couto C, Pires P, Valente MT, da Silva Bigonha R, Hora AC, Anquetil N (2013) Bugmaps-granger: A tool for causality analysis between source code metrics and bugs

  12. Couto C, Pires P, Valente MT, Bigonha RS, Anquetil N (2014) Predicting software defects with causality tests. J Syst Softw 93:24–41.

  13. Cox D, Miller H (1965) The Theory of Stochastic Process, 1 edn. Chapman and Hall, London

  14. Cramer H (1946) Mathematical Methods of Statistics, 1 edn. Princeton University Press

  15. Cui D, Liu T, Cai Y, Zheng Q, Feng Q, Jin W, Guo J, Qu Y (2019) Investigating the impact of multiple dependency structures on software defects. In: Proceedings of the 41st International Conference on Software Engineering, ICSE ’19. IEEE Press, Piscataway, pp 584–595.

  16. de Andrade HS, Almeida E, Crnkovic I (2014) Architectural bad smells in software product lines: an exploratory study. In: Proceedings of the WICSA 2014 Companion Volume, WICSA ’14 Companion. ACM, pp 12:1–12:6.

  17. Deursen Av, Moonen L, Bergh Avd, Kok G (2001) Refactoring test code. In: M. Marchesi (ed.) Proceedings of the 2nd International Conference on Extreme Programming and Flexible Processes (XP2001). University of Cagliari, pp 92–95

  18. Ferreira KA, Bigonha MA, Bigonha RS, Mendes LF, Almeida HC (2012) Identifying thresholds for object-oriented software metrics. J Syst Softw 85(2):244–257. Special issue with selected papers from the 23rd Brazilian Symposium on Software Engineering

  19. Filó TGS, Da Silva Bigonha MA (2015) A catalogue of thresholds for object-oriented software metrics

  20. Fontana FA, Ferme V, Marino A, Walter B, Martenka P (2013) Investigating the impact of code smells on system’s quality: an empirical study on systems of different application domains. In: 2013 IEEE International conference on software maintenance (ICSM). IEEE, pp 260–269

  21. Fontana FA, Ferme V, Zanoni M (2015) Towards assessing software architecture quality by exploiting code smell relations. In: Proceedings of the 2015 IEEE/ACM 2Nd International Workshop on Software Architecture and Metrics, SAM ’15. IEEE Computer Society, Washington, pp 1–7.

  22. Fontana FA, Pigazzini I, Roveda R, Zanoni M (2016) Automatic detection of instability architectural smells. In: 2016 IEEE international conference on Software maintenance and evolution (ICSME). IEEE, pp 433–437

  23. Fontana FA, Pigazzini I, Roveda R, Tamburri D, Zanoni M, Nitto ED (2017) Arcan: a tool for architectural smells detection. In: 2017 IEEE International conference on software architecture workshops (ICSAW). IEEE, pp 282–285

  24. Fontana FA, Lenarduzzi V, Roveda R, Taibi D (2019) Are architectural smells independent from code smells? an empirical study. J Syst Softw 154:139–156.

  25. Fourati R, Bouassida N, Abdallah HB (2011) A Metric-Based Approach for Anti-pattern Detection in UML Designs. In: Computer and information science 2011. Springer, Berlin, pp 17–33

  26. Fowler M (1999) Refactoring: Improving the Design of Existing Programs, 1 edn. Addison-Wesley Professional

  27. Fuller WA (1976) Introduction to Statistical Time Series, 1 edn. Wiley, New York

  28. Garcia J, Popescu D, Edwards G, Medvidovic N (2009) Toward a catalogue of architectural bad smells. In: Proceedings of the 5th International Conference on the Quality of Software Architectures: Architectures for Adaptive Software Systems, QoSA ’09. Springer, Berlin, pp 146–162.

  29. Garcia J (2014) Technical report: Architectural Smell Definitions and Formalizations. [Online; accessed 16-June-2017]

  30. Granger CWJ (1969) Investigating causal relations by econometric models and cross-spectral methods. Econometrica 37(3):424–438.

  31. Guimaraes E, Garcia A, Cai Y (2014) Exploring blueprints on the prioritization of architecturally relevant code anomalies – a controlled experiment. In: 2014 IEEE 38Th annual computer software and applications conference, pp 344–353.

  32. Guimarães E, Vidal S, Garcia A, Diaz Pace JA, Marcos C (2018) Exploring architecture blueprints for prioritizing critical code anomalies: Experiences and tool support. Softw Pract Exper 48(5):1077–1106.

  33. Herbold S, Grabowski J, Waack S (2011) Calculation and optimization of thresholds for sets of software metrics. Empir Softw Eng 16:812–841

    Article  Google Scholar 

  34. Hochstein L, Lindvall M (2003) Diagnosing architectural degeneration. In: 2003. Proceedings of 28Th annual NASA goddard software engineering workshop, pp 137–142

  35. Kessentini W, Kessentini M, Sahraoui H, Bechikh S, Ouni A (2014) A cooperative parallel Search-Based software engineering approach for Code-Smells detection. IEEE Trans Softw Eng 40(9):841–861

    Article  Google Scholar 

  36. Khomh F, Vaucher S, Guéhéneuc YG, Sahraoui H (2009) A bayesian approach for the detection of code and design smells. In: QSIC ’09: Proceedings of the 2009 Ninth International Conference on Quality Software, pp 305–314. IEEE Computer Society

  37. Koschke R (2007) Duplication, Redundancy, and Similarity in Software, no. 06301 in Dagstuhl Seminar Proceedings. Internationales Begegnungs- und Forschungszentrum für Informatik (IBFI), Schloss Dagstuhl. Koschke R, Merlo E, Walenstein A (eds)

  38. Koziolek H, Domis D, Goldschmidt T, Vorst P (2013) Measuring architecture sustainability. IEEE Softw 30(6):54–62.

    Article  Google Scholar 

  39. Kruchten P, Nord RL, Ozkaya I (2012) Technical debt: From metaphor to theory and practice. IEEE Softw 29(6):18–21.

    Article  Google Scholar 

  40. Kwiatkowski D, Phillips PC, Schmidt P, Shin Y (1992) Testing the null hypothesis of stationarity against the alternative of a unit root: How sure are we that economic time series have a unit root? J Econ 54(1):159–178.

  41. Lanza M, Marinescu R, Ducasse S (2005) Object-Oriented Metrics in practice. Springer, Berlin

  42. Le DM, Carrillo C, Capilla R, Medvidovic N (2016) Relating architectural decay and sustainability of software systems. In: 2016 13Th working IEEE/IFIP conference on software architecture (WICSA), pp 178–181.

  43. Le DM, Link D, Shahbazian A, Medvidovic N (2018) An empirical study of architectural decay in open-source software. In: 2018 IEEE International conference on software architecture (ICSA), pp 176–17609.

  44. Li Z, Liang P, Avgeriou P (2015) Architectural technical debt identification based on architecture decisions and change scenarios. In: 2015 12Th working IEEE/IFIP conference on software architecture, pp 65–74.

  45. Lippert M, Roock S (2006) Refactoring in large software projects: performing complex restructurings successfully. Wiley, New York

  46. Liu H, Ma Z, Shao W, Niu Z (2012) Schedule of bad smell detection and resolution: a new way to save effort. IEEE Trans Softw Eng 38(1):220–235.

    Article  Google Scholar 

  47. Lozano A, Mens K, Portugal J (2015) Analyzing code evolution to uncover relations. In: 2015 IEEE 2Nd international workshop on patterns promotion and anti-patterns prevention (PPAP), pp 1–4.

  48. Lutellier T, Chollak D, Garcia J, Tan L, Rayside D, Medvidović N, Kroeger R (2018) Measuring the impact of code dependencies on software architecture recovery techniques. IEEE Trans Softw Eng 44(2):159–181.

    Article  Google Scholar 

  49. Ma W, Chen L, Zhou Y, Xu B, Zhou X (2015) Are anti-patterns coupled? an empirical study. In: 2015 IEEE International conference on software quality, reliability and security, pp 242–251.

  50. Macia I, Arcoverde R, Garcia A, Chavez C, von Staa A (2012a) On the relevance of code anomalies for identifying architecture degradation symptoms. In: 2012 16Th european conference on software maintenance and reengineering, pp 277–286

  51. Macia I, Garcia J, Popescu D, Garcia A, Medvidovic N, von Staa A (2012b) Are automatically-detected code anomalies relevant to architectural modularity? In: the 11th annual international conference, pp 167–178 ACM Press

  52. Mantyla M, Vanhanen J, Lassenius C (2003a) A taxonomy and an initial empirical study of bad smells in code. In: 2003. ICSM 2003. Proceedings of International conference on software maintenance, pp 381–384.

  53. Mantyla M, Vanhanen J, Lassenius C (2003b) A taxonomy and an initial empirical study of bad smells in code. In: 2003. ICSM 2003. Proceedings of International conference on software maintenance, pp 381–384.

  54. Marinescu R (2004) Detection strategies: Metrics-based rules for detecting design flaws. In: Proceedings of the 20th IEEE International Conference on Software Maintenance, ICSM ’04. IEEE Computer Society, pp 350–359

  55. Martin RC (2002) Agile software development: principles, patterns, and practices. Prentice Hall

  56. Martini A, Fontana FA, Biaggi A, Roveda R (2018) Identifying and prioritizing architectural debt through architectural smells: a case study in a large software company. In: 12Th european conference on software architecture (ECSA 2018).

  57. Miller GA (1956) The magical number seven plus or minus two: some limits on our capacity for processing information. Psychol Rev 63(2):81–97

    Article  Google Scholar 

  58. Mo R, Cai Y, Kazman R, Xiao L (2015) Hotspot patterns: The formal definition and automatic detection of architecture smells. In: WICSA. IEEE Computer Society, pp 51–60.

  59. Mo R, Cai Y, Kazman R, Xiao L, Feng Q (2019) Architecture anti-patterns: Automatically detectable violations of design principles. EEE Transactions on Software Engineering:1–1.

  60. Moha N, Guėhėneuc Y, Duchien L, Meur AL (2010) DECOR: A Method for the specification and detection of code and design smells. IEEE Trans Softw Eng 36(1):20–36.

    Article  Google Scholar 

  61. Munaiah N, Kroh S, Cabrey C, Nagappan M (2017) Curating github for engineered software projects. Empir Softw Eng 22(6):3219–3253.

    Article  Google Scholar 

  62. Nam D, Lee YK, Medvidovic N (2018) Eva: a tool for visualizing software architectural evolution. In: 2018 IEEE/ACM 40Th international conference on software engineering: Companion (ICSE-companion), pp 53–56

  63. Oizumi WN, Garcia AF, Colanzi TE, Ferreira M, Staa A (2014) When code-anomaly agglomerations represent architectural problems? an exploratory study. In: 2014 Brazilian symposium on software engineering, pp 91–100.

  64. Oizumi WN, Garcia AF, Colanzi TE, Ferreira M, Staa AV (2015) On the relationship of code-anomaly agglomerations and architectural problems. J Softw Eng Res Dev 3(1):11.

    Article  Google Scholar 

  65. Oizumi W, Garcia A, da Silva Sousa L, Cafeo B, Zhao Y (2016) Code anomalies flock together: Exploring code anomaly agglomerations for locating design problems. In: Proceedings of the 38th International Conference on Software Engineering, ICSE ’16. ACM, New York, pp 440–451.

  66. Palomba F, Bavota G, Di Penta M, Oliveto R, Poshyvanyk D, De Lucia A (2015) Mining version histories for detecting code smells. IEEE Trans Softw Eng 41(5):462–489

    Article  Google Scholar 

  67. Palomba F, Bavota G, Penta MD, Oliveto R, Lucia AD, Poshyvanyk D (2013) Detecting bad smells in source code using change history information. In: 2013 28Th IEEE/ACM international conference on automated software engineering (ASE), pp 268–278.

  68. Palomba F, Bavota G, Penta MD, Fasano F, Oliveto R, Lucia AD (2018) A large-scale empirical study on the lifecycle of code smell co-occurrences. Inf Softw Technol 99:1–10.

  69. Pietrzak B, Walter B (2006) Leveraging code smell detection with inter-smell relations. In: Abrahamsson P, Marchesi M, Succi G (eds) Extreme programming and agile processes in software engineering. Springer, Berlin, pp 75–84

  70. Samarthyam G, Suryanarayana G, Sharma T (2016) Refactoring for software architecture smells. In: Proceedings of the 1st International Workshop on Software Refactoring. ACM, pp 1–4.

  71. Sharma T, Fragkoulis M, Spinellis D (2016a) Does your configuration code smell?. In: Proceedings of the 13th International Workshop on Mining Software Repositories, MSR’16, pp 189–200.

  72. Sharma T, Mishra P, Tiwari R (2016b) Designite — a software design quality assessment tool. In: Proceedings of the First International Workshop on Bringing Architecture Design Thinking into Developers’ Daily Activities, BRIDGE ’16. ACM.

  73. Sharma T, Fragkoulis M, Spinellis D (2017) House of cards: Code smells in open-source c# repositories. In: 2017 ACM/IEEE International symposium on empirical software engineering and measurement (ESEM), pp 424–429.

  74. Sharma T (2018a) Designite - A Software Design Quality Assessment Tool. [Online; accessed 31-Mar-2018]

  75. Sharma T, Spinellis D (2018b) A survey on software smells. J Syst Softw 138:158–173.

  76. Sharma T (2019a) A dataset of code smells.

  77. Sharma T (2019b) Designite validation data.

  78. Suryanarayana G, Samarthyam G, Sharma T (2014) Refactoring for Software Design Smells: Managing Technical Debt, 1 edn. Morgan Kaufmann

  79. Tamburri D, Kazman R, Van Den Heuvel WJ (2019) Splicing community and software architecture smells in agile teams: an industrial study. In: Agile and lean: organizations, Products and Development.

  80. Tran JB, Godfrey MW, Lee EHS, Holt RC (2000) Architectural repair of open source software. In: Proceedings IWPC 2000. 8th International Workshop on Program Comprehension, pp 48–59.

  81. VanderWeele TJ, Shpitser I (2013) On the definition of a confounder. Ann Stat 41(1):196–220.

    MathSciNet  Article  Google Scholar 

  82. Verdecchia R, Malavolta I, Lago P (2018) Architectural technical debt identification: The research landscape. In: Proceedings of the 2018 International Conference on Technical Debt, TechDebt ’18. ACM, New York, pp 11–20.

  83. Vidal S, Vazquez H, Díaz-pace JA, Marcos C, Garcia A, Oizumi W (2016a) JSpIRIT: A flexible tool for the analysis of code smells. In: Proceedings - International Conference of the Chilean Computer Science Society, SCCC. Universidad Nacional del Centro de la Provincia de Buenos Aires, Tandil, IEEE, pp 1–6

  84. Vidal SA, Marcos C, Díaz-Pace JA (2016b) An approach to prioritize code smells for refactoring. Autom Softw Eng 23(3):501–532

    Article  Google Scholar 

  85. Walter B, Fontana FA, Ferme V (2018) Code smells and their collocations: a large-scale experiment on open-source systems. J Syst Softw 144:1–21

    Article  Google Scholar 

  86. Xiao L, Cai Y, Kazman R (2014) Titan: a toolset that connects software architecture with quality analysis. In: FSE 2014: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. Drexel University, ACM, pp 763–766

  87. Yamashita A, Moonen L (2013a) Exploring the impact of inter-smell relations on software maintainability: an empirical study. In: 2013 35Th international conference on software engineering (ICSE)., pp 682–691

  88. Yamashita A, Moonen L (2013b) To what extent can maintenance problems be predicted by code smell detection? – an empirical study. Inf Softw Technol 55(12):2223–2242

    Article  Google Scholar 

  89. Yamashita A, Zanoni M, Fontana FA, Walter B (2015) Inter-smell relations in industrial and open source systems: a replication and comparative analysis. In: 2015 IEEE International conference on software maintenance and evolution (ICSME), pp 121–130

Download references


The authors would like to thank Panos Louridas and Vasiliki Efstathiou from the Athens University of Economics and Business for providing useful improvement suggestions. We also like to thank Rohit Tiwari and Amit Dogra for putting numerous hours validating Designite.

This work was partially funded by the seneca project, which is part of the Marie Skłodowska-Curie Innovative Training Networks (itn-eid). Grant agreement number 642954.

Author information



Corresponding author

Correspondence to Tushar Sharma.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Communicated by: Barbora Buhnova

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Sharma, T., Singh, P. & Spinellis, D. An empirical investigation on the relationship between design and architecture smells. Empir Software Eng 25, 4020–4068 (2020).

Download citation


  • Maintainability
  • Code quality
  • Code smells
  • Architecture smells
  • Design smells
  • Inter-smell relationships
  • Collocation
  • Correlation
  • Causality
  • Refactoring