An empirical investigation on the relationship between design and architecture smells

Context: 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. Objective: The paper aims to study architecture smells characteristics, investigate correlation, collocation, and causation relationships between architecture and design smells. Method: 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. Results: 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.

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

[2]  Foutse Khomh,et al.  A Bayesian Approach for the Detection of Code and Design Smells , 2009, 2009 Ninth International Conference on Quality Software.

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

[4]  Alessandro F. Garcia,et al.  Exploring architecture blueprints for prioritizing critical code anomalies: Experiences and tool support , 2018, Softw. Pract. Exp..

[5]  Nadia Bouassida,et al.  A Metric-Based Approach for Anti-pattern Detection in UML Designs , 2011 .

[6]  Yuanfang Cai,et al.  Titan: a toolset that connects software architecture with quality analysis , 2014, SIGSOFT FSE.

[7]  Nenad Medvidovic,et al.  Toward a Catalogue of Architectural Bad Smells , 2009, QoSA.

[8]  Francesca Arcelli Fontana,et al.  Towards Assessing Software Architecture Quality by Exploiting Code Smell Relations , 2015, 2015 IEEE/ACM 2nd International Workshop on Software Architecture and Metrics.

[9]  Rainer Koschke,et al.  Survey of Research on Software Clones , 2006, Duplication, Redundancy, and Similarity in Software.

[10]  Yuanfang Cai,et al.  Hotspot Patterns: The Formal Definition and Automatic Detection of Architecture Smells , 2015, 2015 12th Working IEEE/IFIP Conference on Software Architecture.

[11]  Yuming Zhou,et al.  Are Anti-patterns Coupled? An Empirical Study , 2015, 2015 IEEE International Conference on Software Quality, Reliability and Security.

[12]  Francesca Arcelli Fontana,et al.  Code smells and their collocations: A large-scale experiment on open-source systems , 2018, J. Syst. Softw..

[13]  Mika Mäntylä,et al.  A taxonomy and an initial empirical study of bad smells in code , 2003, International Conference on Software Maintenance, 2003. ICSM 2003. Proceedings..

[14]  A. Yamashita,et al.  Exploring the impact of inter-smell relations on software maintainability: An empirical study , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[15]  Ivar Jacobson,et al.  The Unified Modeling Language User Guide , 1998, J. Database Manag..

[16]  Davide Taibi,et al.  Are Architectural Smells Independent from Code Smells? An Empirical Study , 2017, J. Syst. Softw..

[17]  Robert L. Nord,et al.  Technical Debt: From Metaphor to Theory and Practice , 2012, IEEE Software.

[18]  Nenad Medvidovic,et al.  Are automatically-detected code anomalies relevant to architectural modularity?: an exploratory analysis of evolving systems , 2012, AOSD.

[19]  Claudia A. Marcos,et al.  An approach to prioritize code smells for refactoring , 2014, Automated Software Engineering.

[20]  Marco Tulio Valente,et al.  Predicting software defects with causality tests , 2014, J. Syst. Softw..

[21]  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).

[22]  Qinghua Zheng,et al.  Investigating the Impact of Multiple Dependency Structures on Software Defects , 2019, 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE).

[23]  Nenad Medvidovic,et al.  An Empirical Study of Architectural Decay in Open-Source Software , 2018, 2018 IEEE International Conference on Software Architecture (ICSA).

[24]  Heiko Koziolek,et al.  Measuring Architecture Sustainability , 2013, IEEE Software.

[25]  Derek Rayside,et al.  Measuring the Impact of Code Dependencies on Software Architecture Recovery Techniques , 2018, IEEE Transactions on Software Engineering.

[26]  Kim Mens,et al.  Analyzing code evolution to uncover relations , 2015, 2015 IEEE 2nd International Workshop on Patterns Promotion and Anti-patterns Prevention (PPAP).

[27]  Gabriele Bavota,et al.  An experimental investigation on the innate relationship between quality and refactoring , 2015, J. Syst. Softw..

[28]  Michele Marchesi,et al.  Extreme Programming and Agile Processes in Software Engineering , 2003, Lecture Notes in Computer Science.

[29]  Bartosz Walter,et al.  Leveraging Code Smell Detection with Inter-smell Relations , 2006, XP.

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

[31]  Francesca Arcelli Fontana,et al.  Arcan: A Tool for Architectural Smells Detection , 2017, 2017 IEEE International Conference on Software Architecture Workshops (ICSAW).

[32]  Aiko Fallas Yamashita,et al.  To what extent can maintenance problems be predicted by code smell detection? - An empirical study , 2013, Inf. Softw. Technol..

[33]  Francesca Arcelli Fontana,et al.  Inter-smell relations in industrial and open source systems: A replication and comparative analysis , 2015, 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[34]  Arie van Deursen,et al.  Refactoring test code , 2001 .

[35]  Mika Mäntylä,et al.  Comparing and experimenting machine learning techniques for code smell detection , 2015, Empirical Software Engineering.

[36]  Houari A. Sahraoui,et al.  A Cooperative Parallel Search-Based Software Engineering Approach for Code-Smells Detection , 2014, IEEE Transactions on Software Engineering.

[37]  Tyler J. VanderWeele,et al.  On the definition of a confounder , 2013, Annals of statistics.

[38]  Yuanfang Cai,et al.  Architecture Anti-Patterns: Automatically Detectable Violations of Design Principles , 2021, IEEE Transactions on Software Engineering.

[39]  Lorin Hochstein,et al.  Diagnosing architectural degeneration , 2003, 28th Annual NASA Goddard Software Engineering Workshop, 2003. Proceedings..

[40]  C. Granger Investigating causal relations by econometric models and cross-spectral methods , 1969 .

[41]  Nenad Medvidovic,et al.  A large-scale study of architectural evolution in open-source software systems , 2017, Empirical Software Engineering.

[42]  Francesca Arcelli Fontana,et al.  Investigating the Impact of Code Smells on System's Quality: An Empirical Study on Systems of Different Application Domains , 2013, 2013 IEEE International Conference on Software Maintenance.

[43]  Diomidis Spinellis,et al.  A survey on software smells , 2018, J. Syst. Softw..

[44]  Alessandro F. Garcia,et al.  When Code-Anomaly Agglomerations Represent Architectural Problems? An Exploratory Study , 2014, 2014 Brazilian Symposium on Software Engineering.

[45]  Alessandro F. Garcia,et al.  On the relationship of code-anomaly agglomerations and architectural problems , 2015, Journal of Software Engineering Research and Development.

[46]  Girish Suryanarayana,et al.  Refactoring for software architecture smells , 2016, IWoR@ASE.

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

[48]  Yann-Gaël Guéhéneuc,et al.  DECOR: A Method for the Specification and Detection of Code and Design Smells , 2010, IEEE Transactions on Software Engineering.

[49]  Girish Suryanarayana,et al.  Chapter 1 – Technical Debt , 2015 .

[50]  P. Phillips,et al.  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? , 1992 .

[51]  H. Cramér Mathematical Methods of Statistics (PMS-9), Volume 9 , 1946 .

[52]  Alessandro F. Garcia,et al.  On the Relevance of Code Anomalies for Identifying Architecture Degradation Symptoms , 2012, 2012 16th European Conference on Software Maintenance and Reengineering.

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

[54]  Yuanfang Cai,et al.  Exploring Blueprints on the Prioritization of Architecturally Relevant Code Anomalies -- A Controlled Experiment , 2014, 2014 IEEE 38th Annual Computer Software and Applications Conference.

[55]  Joshua Bloch Effective Java (2nd Edition) (The Java Series) , 2008 .

[56]  Paul Clements,et al.  Software architecture in practice , 1999, SEI series in software engineering.

[57]  Nenad Medvidovic,et al.  EVA: A Tool for Visualizing Software Architectural Evolution , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion).

[58]  Foutse Khomh,et al.  An Empirical Study of the Impact of Two Antipatterns, Blob and Spaghetti Code, on Program Comprehension , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.

[59]  Marco Tulio Valente,et al.  BugMaps-Granger: A Tool for Causality Analysis between Source Code Metrics and Bugs , 2013 .

[60]  Zhendong Niu,et al.  Schedule of Bad Smell Detection and Resolution: A New Way to Save Effort , 2012, IEEE Transactions on Software Engineering.

[61]  Rick Kazman,et al.  Splicing Community and Software Architecture Smells in Agile Teams: An industrial Study , 2019, HICSS.

[62]  Jan Bosch,et al.  Managing architectural technical debt: A unified model and systematic literature review , 2018, J. Syst. Softw..

[63]  Robert C. Martin Agile Software Development, Principles, Patterns, and Practices , 2002 .

[64]  Gabriele Bavota,et al.  Mining Version Histories for Detecting Code Smells , 2015, IEEE Transactions on Software Engineering.

[65]  Mariza A. S. Bigonha,et al.  A Catalogue of Thresholds for Object-Oriented Software Metrics , 2015 .

[66]  C. Granger Investigating Causal Relations by Econometric Models and Cross-Spectral Methods , 1969 .

[67]  G. A. Miller THE PSYCHOLOGICAL REVIEW THE MAGICAL NUMBER SEVEN, PLUS OR MINUS TWO: SOME LIMITS ON OUR CAPACITY FOR PROCESSING INFORMATION 1 , 1956 .

[68]  Michael W. Godfrey,et al.  Architectural repair of open source software , 2000, Proceedings IWPC 2000. 8th International Workshop on Program Comprehension.

[69]  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).

[70]  Nenad Medvidovic,et al.  Relating Architectural Decay and Sustainability of Software Systems , 2016, 2016 13th Working IEEE/IFIP Conference on Software Architecture (WICSA).

[71]  Patricia Lago,et al.  Architectural Technical Debt Identification: The Research Landscape , 2018, 2018 IEEE/ACM International Conference on Technical Debt (TechDebt).

[72]  Ivica Crnkovic,et al.  Architectural bad smells in software product lines: an exploratory study , 2014, WICSA '14 Companion.

[73]  Meiyappan Nagappan,et al.  Curating GitHub for engineered software projects , 2017, Empirical Software Engineering.

[74]  Girish Suryanarayana,et al.  Refactoring for Software Design Smells: Managing Technical Debt , 2014 .

[75]  Antonio Martini,et al.  Identifying and Prioritizing Architectural Debt Through Architectural Smells: A Case Study in a Large Software Company , 2018, ECSA.

[76]  Gabriele Bavota,et al.  A large-scale empirical study on the lifecycle of code smell co-occurrences , 2018, Inf. Softw. Technol..

[77]  Thomas J. Mowbray,et al.  AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis , 1998 .

[78]  Peng Liang,et al.  Architectural Technical Debt Identification Based on Architecture Decisions and Change Scenarios , 2015, 2015 12th Working IEEE/IFIP Conference on Software Architecture.

[79]  Gabriele Bavota,et al.  Detecting bad smells in source code using change history information , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[80]  Tushar Sharma,et al.  Designite - A Software Design Quality Assessment Tool , 2016, 2016 IEEE/ACM 1st International Workshop on Bringing Architectural Design Thinking Into Developers' Daily Activities (BRIDGE).

[81]  Francesca Arcelli Fontana,et al.  Automatic Detection of Instability Architectural Smells , 2016, 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[82]  Diomidis Spinellis,et al.  Does Your Configuration Code Smell? , 2016, 2016 IEEE/ACM 13th Working Conference on Mining Software Repositories (MSR).

[83]  Diomidis Spinellis,et al.  House of Cards: Code Smells in Open-Source C# Repositories , 2017, 2017 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM).