Automatic Identification of Component Roles in Software Design Networks

  • Xavyr T. RademakerEmail author
  • Michel R. V. Chaudron
  • Frank W. Takes
Conference paper
Part of the Studies in Computational Intelligence book series (SCI, volume 813)


This paper studies the complex network structure of software design networks. In a software design network, each node is a class (a specific part of a piece of software) and each link represents a software code-related dependency between two classes. This work provides two main contributions. First, we reveal how typical software networks exhibit a structure very similar to other real-world networks: they are sparse, scale-free and have low average node-to-node-distances. In addition, we demonstrate how various distance, network clustering and assortativity metrics can provide important insights for software engineers related to software design decisions, coupling and inter-package relationships. Second, we propose a novel network-driven method to automatically determine the role of a software class, a frequently encountered problem by software engineers trying to understand a large-scale software system. We use a role taxonomy from literature which defines six so-called archetypes of software classes, which, once assigned to a class, can provide useful insights for engineers. In this paper we train and validate a model that is able to automatically assess which of these archetypes a class belongs to. Experiments on three unique high quality network datasets of large real-world software systems demonstrate how network features are able to realize high accuracy models for this task.


Network science UML Class diagrams Classification Software systems 


  1. 1.
    Barabási, A.L.: Network Science. Cambridge University Press, Cambridge (2016)Google Scholar
  2. 2.
    Brandes, U.: A faster algorithm for betweenness centrality. J. Math. Sociol. 25(2), 163–177 (2001)CrossRefGoogle Scholar
  3. 3.
    Chawla, N.V., Bowyer, K.W., Hall, L.O., Kegelmeyer, W.P.: Smote: synthetic minority over-sampling technique. J. Artif. Intell. Res. 16(1), 321–357 (2002)CrossRefGoogle Scholar
  4. 4.
    Chong, C.Y., Lee, S.P.: Analyzing maintainability and reliability of object-oriented software using weighted complex network. J. Syst. Softw. 110, 28–53 (2015)CrossRefGoogle Scholar
  5. 5.
    Concas, G., Marchesi, M., Murgia, A., Tonelli, R.: An empirical study of social networks metrics in object-oriented software. Adv. Softw. Eng. 2010, 4 (2010)Google Scholar
  6. 6.
    Dragan, N., Collard, M.L., Maletic, J.I.: Automatic identification of class stereotypes. In: Proceedings of the IEEE International Conference on Software Maintenance, pp. 1–10 (2010)Google Scholar
  7. 7.
    Fowler, M.: UML Distilled: A Brief Guide to the Standard Object Modeling Language. Addison-Wesley Professional (2004)Google Scholar
  8. 8.
    Freeman, L.C.: Centrality in social networks conceptual clarification. Soc. Netw. 1(3), 215–239 (1978)CrossRefGoogle Scholar
  9. 9.
    Genero, M., Piattini, M., Calero, C.: A survey of metrics for UML class diagrams. J. Object Technol. 4(9), 59–92 (2005)CrossRefGoogle Scholar
  10. 10.
    Hagberg, A., Swart, P., S Chult, D.: Exploring network structure, dynamics, and function using network. Technical Report, Los Alamos National Lab. (2008)Google Scholar
  11. 11.
    Larman, C.: Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition), 3rd edn. Prentice Hall PTR, Upper Saddle River (2004)Google Scholar
  12. 12.
    Menze, B.H., et al.: A comparison of random forest and its Gini importancefor the feature selection and classification of spectral data. BMC Bioinform. 10(1), 213 (2009)Google Scholar
  13. 13.
    Myers, C.R.: Software systems as complex networks: structure, function, and evolvability of software collaboration graphs. Phys. Rev. E 68(4), 046,116 (2003)MathSciNetCrossRefGoogle Scholar
  14. 14.
    Pawlak, R., Monperrus, M., Petitprez, N., Noguera, C., Seinturier, L.: Spoon: a library for implementing analyses and transformations of java source code. Softw.: Pract. Exp. 46(9), 1155–1179 (2015)Google Scholar
  15. 15.
    Pedregosa, F., et al.: Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011)Google Scholar
  16. 16.
    Rademaker, X.T.: A network-driven feature construction approach for labelling software classes using machine learning. Technical Report, MSc thesis, Leiden University (2018)Google Scholar
  17. 17.
    Rifkin, R., Klautau, A.: In defense of one-vs-all classification. J. Mach. Learn. Res. 5, 101–141 (2004)MathSciNetzbMATHGoogle Scholar
  18. 18.
    Tekin, U., Buzluca, F.: A graph mining approach for detecting identical design structures in object-oriented design models. Sci. Comput. Program. 95(P4), 406–425 (2014)CrossRefGoogle Scholar
  19. 19.
    Thung, F., Lo, D., Osman, M.H., Chaudron, M.R.V.: Condensing class diagrams by analyzing design and network metrics using optimistic classification. In: Proceedings of the 22nd International Conference on Program Comprehension (2014)Google Scholar
  20. 20.
    Tsantalis, N., Chatzigeorgiou, A., Stephanides, G., Halkidis, S.T.: Design pattern detection using similarity scoring. IEEE Trans. Softw. Eng. 32(11), 896–909 (2006)CrossRefGoogle Scholar
  21. 21.
    Wang, J., Ai, J., Yang, Y., Su, W.: Identifying key classes of object-oriented software based on software complex network. In: Proceedings of the 2nd IEEE International Conference on System Reliability and Safety, pp. 444–449 (2017)Google Scholar
  22. 22.
    Wirfs-Brock, R.J.: Characterizing classes. IEEE Softw. 23(2), 9–11 (2006)CrossRefGoogle Scholar
  23. 23.
    Wirfs-Brock, R.J., Johnson, R.E.: Surveying current research in object-oriented design. Commun. ACM 33(9), 104–124 (1990)CrossRefGoogle Scholar
  24. 24.
    Witten, I.H., Frank, E., Hall, M.A., Pal, C.J.: Data Mining: Practical Machine Learning Tools and Techniques, 4th edn. Morgan Kaufmann (2016)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Xavyr T. Rademaker
    • 1
    Email author
  • Michel R. V. Chaudron
    • 2
  • Frank W. Takes
    • 3
  1. 1.Leiden UniversityLeidenThe Netherlands
  2. 2.Chalmers & Gothenburg UniversityGothenburgSweden
  3. 3.Leiden University and University of AmsterdamLeidenThe Netherlands

Personalised recommendations