Abstract
Some methods use the dependencies between source code entities to perform clustering to, e.g., automatically map to an intended modular architecture or reconstruct the implemented software architecture. However, there are many different ways that source code entities can depend on each other in an object-oriented system, and it is not likely that all dependencies are equally useful. We investigate how well an optimized set of weights for 14 different types of dependencies perform when automatically mapping source code to modules using an established mapping technique. The optimized weights were found using genetic optimization. We compare the F1 score of precision and recall to uniform weights and weights computed by module relation ratio in eight open-source systems to evaluate performance. Our experiments show that optimized weights significantly outperform the others, especially in systems that seem not to have been designed using the low coupling, high cohesion principle. We also find that dependencies based on method calls are not useful for automatic mapping in any of the eight systems.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
References
Ali, N., Baker, S., O’Crowley, R., Herold, S., Buckley, J.: Architecture consistency: state of the practice, challenges and requirements. Empir. Softw. Eng. 23, 1–35 (2018)
Brunet, J., Bittencourt, R.A., Serey, D., Figueiredo, J.: On the evolutionary nature of architectural violations. In: IEEE Working Conference on Reverse Engineering, pp. 257–266 (2012)
Buschmann, F., Henney, K., Schmidt, D.C.: Pattern-Oriented Software Architecture, A Pattern Language for Distributed Computing, vol. 4. Wiley, Hoboken (2007)
Christl, A., Koschke, R., Storey, M.A.: Automated clustering to support the reflexion method. Inf. Softw. Technol. 49(3), 255–274 (2007)
Garcia, J., Ivkovic, I., Medvidovic, N.: A comparative analysis of software architecture recovery techniques. In: 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 486–496. IEEE (2013)
Haupt, R.L., Haupt, S.E.: Practical Genetic Algorithms. Wiley, Hoboken (2004)
Lenhard, J., Blom, M., Herold, S.: Exploring the suitability of source code metrics for indicating architectural inconsistencies. Software Qual. J. 27(1), 241–274 (2018). https://doi.org/10.1007/s11219-018-9404-z
Olsson, T., Ericsson, M., Wingkvist, A.: Towards improved initial mapping in semi automatic clustering. In: Proceedings of the 12th European Conference on Software Architecture: Companion Proceedings. ECSA 2018, pp. 51:1–51:7 (2018)
Olsson, T., Ericsson, M., Wingkvist, A.: Semi-automatic mapping of source code using Naive Bayes. In: Proceedings of the 13th European Conference on Software Architecture - Volume 2, pp. 209–216 (2019)
Olsson, T., Ericsson, M., Wingkvist, A.: s4rdm3x: a tool suite to explore code to architecture mapping techniques. J. Open Source Softw. 6(58), 2791 (2021). https://doi.org/10.21105/joss.02791
Rayside, D., Reuss, S., Hedges, E., Kontogiannis, K.: The effect of call graph construction algorithms for object-oriented programs on automatic clustering. In: Proceedings IWPC 2000. 8th International Workshop on Program Comprehension, pp. 191–200. IEEE (2000)
Stavropoulou, I., Grigoriou, M., Kontogiannis, K.: Case study on which relations to use for clustering-based software architecture recovery. Empir. Softw. Eng. 22(4), 1717–1762 (2017). https://doi.org/10.1007/s10664-016-9459-z
Tzerpos, V., Holt, R.C.: The orphan adoption problem in architecture maintenance. In: Proceedings of the Fourth Working Conference on Reverse Engineering, pp. 76–82. IEEE (1997)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Olsson, T., Ericsson, M., Wingkvist, A. (2021). Optimized Dependency Weights in Source Code Clustering. In: Biffl, S., Navarro, E., Löwe, W., Sirjani, M., Mirandola, R., Weyns, D. (eds) Software Architecture. ECSA 2021. Lecture Notes in Computer Science(), vol 12857. Springer, Cham. https://doi.org/10.1007/978-3-030-86044-8_16
Download citation
DOI: https://doi.org/10.1007/978-3-030-86044-8_16
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-86043-1
Online ISBN: 978-3-030-86044-8
eBook Packages: Computer ScienceComputer Science (R0)