Skip to main content

Optimized Dependency Weights in Source Code Clustering

  • Conference paper
  • First Online:
Book cover Software Architecture (ECSA 2021)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/tobias-dv-lnu/Replication/tree/master/ECSA21.

  2. 2.

    https://ant.apache.org.

  3. 3.

    http://argouml.tigris.org.

  4. 4.

    https://commons.apache.org/proper/commons-imaging/.

  5. 5.

    https://jabref.org.

  6. 6.

    https://lucene.apache.org.

  7. 7.

    http://www.promtools.org.

  8. 8.

    http://www.sweethome3d.com.

  9. 9.

    https://teammatesv4.appspot.com.

  10. 10.

    https://github.com/sebastianherold/SAEroConRepo.

References

  1. 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)

    Article  Google Scholar 

  2. 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)

    Google Scholar 

  3. Buschmann, F., Henney, K., Schmidt, D.C.: Pattern-Oriented Software Architecture, A Pattern Language for Distributed Computing, vol. 4. Wiley, Hoboken (2007)

    Google Scholar 

  4. Christl, A., Koschke, R., Storey, M.A.: Automated clustering to support the reflexion method. Inf. Softw. Technol. 49(3), 255–274 (2007)

    Article  Google Scholar 

  5. 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)

    Google Scholar 

  6. Haupt, R.L., Haupt, S.E.: Practical Genetic Algorithms. Wiley, Hoboken (2004)

    MATH  Google Scholar 

  7. 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

    Article  Google Scholar 

  8. 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)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. 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

    Article  Google Scholar 

  11. 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)

    Google Scholar 

  12. 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

    Article  Google Scholar 

  13. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tobias Olsson .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics