On the evolution and impact of architectural smells—an industrial case study
Empirical Software Engineering
(2022) 27:86
https://doi.org/10.1007/s10664-022-10132-7
On the evolution and impact of architectural
smells—an industrial case study
Darius Sas1
· Paris Avgeriou1 · Umut Uyumaz2
Accepted: 11 February 2022
© The Author(s) 2022
Abstract
Architectural smells (AS) are notorious for their long-term impact on the Maintainability
and Evolvability of software systems. The majority of research work has investigated this
topic by mining software repositories of open source Java systems, making it hard to generalise and apply them to an industrial context and other programming languages. To address
this research gap, we conducted an embedded multiple-case case study, in collaboration with
a large industry partner, to study how AS evolve in industrial embedded systems. We detect
and track AS in 9 C/C++ projects with over 30 releases for each project that span over two
years of development, with over 20 millions lines of code in the last release only. In addition to these quantitative results, we also interview 12 among the developers and architects
working on these projects, collecting over six hours of qualitative data about the usefulness
of AS analysis and the issues they experienced while maintaining and evolving artefacts
affected by AS. Our quantitative findings show how individual smell instances evolve over
time, how long they typically survive within the system, how they overlap with instances of
other smell types, and finally what the introduction order of smell types is when they overlap. Our qualitative findings, instead, provide insights on the effects of AS on the long-term
maintainability and evolvability of the system, supported by several excerpts from our interviews. Practitioners also mention what parts of the AS analysis actually provide actionable
insights that they can use to plan refactoring activities.
Keywords Architectural smells · Empirical study · Industrial context · Software repository
mining · Qualitative study · C/C++
Communicated by: Hélène Waeselynck
Darius Sas
Paris Avgeriou
Umut Uyumaz
1
Bernoulli Institute for Mathematics, Computer Science, and Artificial Intelligence, University
of Groningen, Bernoulliborg Nijenborgh 9, 9747 AG Groningen, Netherlands
2
ASML, De Run 6501, 5504 DR Veldhoven, Netherlands
86
Page 2 of 45
Empir Software Eng
(2022) 27:86
1 Introduction
Architectural decisions have been established as one of the most important factors affecting
long-term maintenance and evolution of software systems (Ernst et al. 2015). Architectural smells (AS) are a specific type of such decisions; they are defined by Garcia et al. as
“commonly-used (although not always intentional) architectural decisions that negatively
impact system quality” (Garcia et al. 2009). There are several research works that define
the different types of architectural smells (e.g. god components or cycles between components) and discuss their impact on maintainability and other qualities (Lippert and Roock
2006; Arcelli Fontana et al. 2017b; Mo et al. 2015; Le et al. 2016; Garcia et al. 2009). This
impact usually depends on the type of smell, but generally, an architectural smell can impact
maintenance activities of all kinds (corrective, perfective, etc.) by violating software design
principles (Azadi et al. 2019). For example, AS can hinder the adaptation of a system to
new requirements by increasing the coupling and breaking the modularity of certain parts
of the system (Azadi et al. 2019).
Despite the significant corpus of research available on the topic (Verdecchia et al. 2018),
most studies have a limited scope as they perform mainly source code analyses on open
source systems written in Java. While these studies certainly provide a valid and substantial contribution to the literature, there is insufficient work on real-world industrial systems.
Particularly, to the best of our knowledge, there is no work on the impact of AS on maintainability in the embedded systems (ES) industry, where languages like C, C++, and Python
are used much more than Java (TIOBE 2021).1
To address this shortcoming, this study investigates AS in an industrial setting by
analysing C/C++ projects and eliciting the opinion of software engineers and architects. In
particular, we worked with an industrial partner, ASML,2 and studied how AS evolve and
impact Maintenance and Evolution (van Vliet 2008) in two steps. First, we studied the evolution of AS in one of ASML’s main software product lines, comprised of several millions
of lines of code, by examining: how architectural smell instances evolve in terms of their
characteristics (e.g. number of affected elements, number of dependency edges among the
affected elements, etc.), how long they persist in the system, and how they overlap. Second,
we showed the architects, designers, and developers the results of our analysis and interviewed them about the issues they experience while maintaining the artefacts affected by
architectural smells. This study design allowed us to cover the viewpoints of both the system
(quantitative) and the engineers (qualitative).
The major findings of this study show that smells tend to grow larger over time, affecting
more and more artefacts, and that different smell types exhibit largely different survival
rates, allowing practitioners to do a coarse-grained prioritisation of the smells instances
to refactor. Moreover, the results show that some artefacts are affected by more than one
smell at a time, increasing the effort required to maintain them. Practitioners, on the other
hand, recognise that the presence of smells correlates with frequently changed components,
increased change propagation, the presence of severe bugs, the decay of the architecture,
and general maintenance issues.
The architectural smells considered in this study are Cyclic Dependency (CD), Hub-Like
Dependency (HL), Unstable Dependency (UD), and God Component (GC) (Arcelli Fontana
et al. 2017b; Lippert and Roock 2006; Sas et al. 2019). We opted to study these smells as
1 See our replication package for the version at the moment of writing.
2 Visit www.asml.com for more info.
Empir Software Eng
(2022) 27:86
Page 3 of 45 86
they are some of the most prominent architecture smells, and there already exists tools that
support their automatic detection (Arcelli Fontana et al. 2017a, b).
The rest of the paper is organised as follows: Section 2 provides a brief overview on the
architectural smells subject of this study as well as their characteristics and the tool used
to detect them; Section 3 discusses related work and compares it with this study; Section 4
provides a detailed description of the study design; Sections 5, 6, 7, and 8 describe the
data analysis methodology and results for each research question; Section 9 provides a
discussion on the findings presented in the previous sections; Section 10 summarises the
implications of our findings for practitioners; Section 11 summarises the i (...truncated)