Published November 22, 2020 | Version v1
Conference paper Open

Software Architecture Reconstruction via a Genetic Algorithm: Applying the Move Class Refactoring

  • 1. Department of Applied Informatics, University of Macedonia, Thessaloniki, Greece
  • 2. Department of Electrical and Computer Engineering, University of Western Macedonia, Kozani, Greece
  • 3. Department of Informatics, Aristotle University of Thessaloniki, Thessaloniki, Greece
  • 4. Department of Information and Electronic Engineering, International Hellenic University, Thessaloniki, Greece


Modularity is one of the four key principles of software design and architecture. According to this principle, software should be organized into modules that are tightly linked internally (high cohesion), whereas at the same time as independent from other modules as possible (low coupling). However, in practice, this principle is violated due to poor architecting design decisions, lack of time, or coding shortcuts, leading to a phenomenon termed as architectural technical debt (ATD). To alleviate this problem (lack of architectural modularity), the most common solution is the application of a software refactoring, namely Move Class—i.e., moving classes (the core artifact in object-oriented systems) from one module to another. To identify Move Class refactoring opportunities, we employ a search-based optimization process, relying on optimization metrics, through which optimal moves are derived. Given the extensive search space required for applying a brute-force search strategy, in this paper, we propose the use of a genetic algorithm that re-arranges existing software classes into existing or new modules (software packages in Java, or folders in C++). To validate the usefulness of the proposed refactorings, we performed an industrial case study on three projects (from the Aviation, Healthcare, and Manufacturing application domains). The results of the study indicate that the proposed architecture reconstruction is able to improve modularity, improving both coupling and cohesion. The obtained results can be useful to practitioners through an open source tool; whereas at the same point, they open interesting future work directions. 



Files (525.8 kB)

Name Size Download all
525.8 kB Preview Download

Additional details


SDK4ED – Software Development toolKit for Energy optimization and technical Debt elimination 780572
European Commission