, Volume 99, Issue 11, pp 1055–1079 | Cite as

Analysis of high structural class coupling in object-oriented software systems

  • Miloš Savić
  • Mirjana Ivanović
  • Miloš Radovanović


Understanding coupling between classes in object-oriented (OO) software systems is useful for a variety of software development and maintenance activities. In this paper we propose a novel, network-based methodology to analyze high structural class coupling in OO software systems. The proposed methodology is based on statistically robust structural analysis of class collaboration networks whose nodes are enriched with both software metrics and domain-independent metrics used in analysis of complex networks. To demonstrate the usefulness of the methodology we analyze five open-source, large-scale software systems written in Java. Contrary to frequently reported findings, the obtained results indicate that high structural class coupling in real software systems cannot be accurately modeled by power-law distributions. Our analysis also shows that highly-coupled classes tend to be significantly more voluminous and functionally important compared to loosely coupled classes, and do not tend to be localized in class inheritance hierarchies. Finally, in four out of five analyzed systems highly coupled classes tend to have drastically higher afferent than efferent coupling. This implies that the existence of high class coupling in an OO software system would rather indicate negative aspects of extensive internal class reuse than negative aspects of extensive internal class aggregation.


High coupling Class collaboration networks Network analysis Software metrics Power-law Class reuse Class aggregation 

Mathematics Subject Classification

05C82 Small world graphs, complex networks 68N30 Mathematical aspects of software engineering (specification, verification, metrics, requirements, etc.) 



The authors gratefully acknowledge the support of this work by the Serbian Ministry of Education, Science and Technological Development through project Intelligent Techniques and Their Integration into Wide-Spectrum Decision Support, no. OI174023.


  1. 1.
    Albert R, Barabási AL (2002) Statistical mechanics of complex networks. Rev Mod Phys 74(1):47–97. doi: 10.1103/RevModPhys.74.47 MathSciNetCrossRefMATHGoogle Scholar
  2. 2.
    Barabasi AL, Albert R (1999) Emergence of scaling in random networks. Science 286(5439):509–512. doi: 10.1126/science.286.5439.509 MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Baxter G, Frean M, Noble J, Rickerby M, Smith H, Visser M, Melton H, Tempero E (2006) Understanding the shape of Java software. In: Proceedings of the 21st annual ACM SIGPLAN conference on object-oriented programming systems, languages, and applications, OOPSLA ’06, pp 397–412. ACM, New York, NY, USA . doi: 10.1145/1167473.1167507
  4. 4.
    Boccaletti S, Latora V, Moreno Y, Chavez M, Hwang D (2006) Complex networks: structure and dynamics. Phys Rep 424(45):175–308. doi: 10.1016/j.physrep.2005.10.009 MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Briand LC, Daly JW, Wüst JK (1999) A unified framework for coupling measurement in object-oriented systems. IEEE Trans Softw Eng 25(1):91–121CrossRefGoogle Scholar
  6. 6.
    Brin S, Page L (1998) The anatomy of a large-scale hypertextual web search engine. Comput Netw ISDN Syst 30(1–7):107–117CrossRefGoogle Scholar
  7. 7.
    Chidamber SR, Kemerer CF (1994) A metrics suite for object oriented design. IEEE Trans Softw Eng 20(6):476–493. doi: 10.1109/32.295895 CrossRefGoogle Scholar
  8. 8.
    Clauset A, Shalizi C, Newman M (2009) Power-law distributions in empirical data. SIAM Rev 51(4):661–703. doi: 10.1137/070710111 MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Concas G, Marchesi M, Pinna S, Serra N (2007) Power-laws in a large object-oriented software system. IEEE Trans Softw Eng 33(10):687–708CrossRefGoogle Scholar
  10. 10.
    de Moura APS, Lai YC, Motter AE (2003) Signatures of small-world and scale-free properties in large computer programs. Phys Rev E 68(1):017,102. doi: 10.1103/PhysRevE.68.017102 CrossRefGoogle Scholar
  11. 11.
    Erceg-Hurn DM, Mirosevich VM (2008) Modern robust statistical methods: an easy way to maximize the accuracy and power of your research. Am Psychol 63(7):591–601. doi: 10.1037/0003-066X.63.7.591 CrossRefGoogle Scholar
  12. 12.
    Erdös P, Rényi A (1959) On random graphs, I. Publ Math Debr 6:290–297MATHGoogle Scholar
  13. 13.
    Freeman LC (1977) A set of measures of centrality based on betweenness. Sociometry 40:35–41CrossRefGoogle Scholar
  14. 14.
    Hylland-Wood D, Carrington D, Kaplan S (2006) Scale-free nature of Java software package, class and method collaboration graphs. Technical report, TR-MS1286, MIND Laboratory, University of Maryland, College Park, USAGoogle Scholar
  15. 15.
    Jenkins S, Kirk SR (2007) Software architecture graphs as complex networks: a novel partitioning scheme to measure stability and evolution. Inf Sci 177:2587–2601. doi: 10.1016/j.ins.2007.01.021 CrossRefGoogle Scholar
  16. 16.
    Kósa B, Balassi M, Englert P, Kiss A (2015) Betweenness versus linerank. Comput Sci Inf Syst 12(1):33–48. doi: 10.2298/CSIS141101092K CrossRefGoogle Scholar
  17. 17.
    Louridas P, Spinellis D, Vlachos V (2008) Power laws in software. ACM Trans Softw Eng Methodol 18(1):2:1–2:26CrossRefGoogle Scholar
  18. 18.
    Mann HB, Whitney DR (1947) On a test of whether one of two random variables is stochastically larger than the other. Ann Math Stat 18(1):50–60. doi: 10.2307/2236101 MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    McCabe TJ (1976) A complexity measure. IEEE Trans Softw Eng 2(4):308–320. doi: 10.1109/TSE.1976.233837 MathSciNetCrossRefMATHGoogle Scholar
  20. 20.
    Myers CR (2003) Software systems as complex networks: structure, function, and evolvability of software collaboration graphs. Phys Rev E 68(4):046,116. doi: 10.1103/PhysRevE.68.046116 CrossRefGoogle Scholar
  21. 21.
    Newman MEJ (2003) The structure and function of complex networks. SIAM Rev 45:167–256. doi: 10.1137/S003614450342480 MathSciNetCrossRefMATHGoogle Scholar
  22. 22.
    Rakić G, Budimac Z (2011) Introducing enriched concrete syntax trees. In: Proceedings of the 14th international multiconference on information society (IS), collaboration, software and services in information society (CSS), pp 211–214Google Scholar
  23. 23.
    Redner S (2005) Citation statistics from 110 years of Physical Review. Phys Today 58(6):49–54. doi: 10.1063/1.1996475 CrossRefGoogle Scholar
  24. 24.
    Savić M, Rakić G, Budimac Z, Ivanović M (2014) A language-independent approach to the extraction of dependencies between source code entities. Inf Softw Technol 56(10):1268–1288. doi: 10.1016/j.infsof.2014.04.011 CrossRefGoogle Scholar
  25. 25.
    Šubelj L, Bajec M (2012) Software systems through complex networks science: review, analysis and applications. In: Proceedings of the first international workshop on software mining, SoftwareMining ’12, pp 9–16. ACM, New York, NY, USA. doi: 10.1145/2384416.2384418
  26. 26.
    Taube-Schock C, Walker R, Witten I (2011) Can we avoid high coupling? In: Mezini M (ed) ECOOP 2011 object-oriented programming. Lecture notes in computer science, vol 6813. Springer, Berlin, pp 204–228. doi: 10.1007/978-3-642-22655-7_10
  27. 27.
    Valverde S, Cancho RF, Solé RV (2002) Scale-free networks from optimal design. EPL 60(4):512–517. doi: 10.1209/epl/i2002-00248-2 CrossRefGoogle Scholar
  28. 28.
    Wen H, DSouza RM, Saul ZM, Filkov V (2009) Evolution of Apache open source software. In: Ganguly N, Deutsch A, Mukherjee A (eds) Dynamics on and of complex networks, modeling and simulation in science, engineering and technology. Birkhuser, Boston, pp 199–215. doi: 10.1007/978-0-8176-4751-3_12 Google Scholar
  29. 29.
    Wheeldon R, Counsell S (2003) Power law distributions in class relationships. In: Proceedings of the third IEEE international workshop on source code analysis and manipulation, pp 45–54. doi: 10.1109/SCAM.2003.1238030
  30. 30.
    Yourdon E, Constantine LL (1979) Structured design: fundamentals of a discipline of computer program and systems design, 1st edn. Prentice-Hall Inc., Upper Saddle RiverMATHGoogle Scholar

Copyright information

© Springer-Verlag Wien 2017

Authors and Affiliations

  • Miloš Savić
    • 1
  • Mirjana Ivanović
    • 1
  • Miloš Radovanović
    • 1
  1. 1.Department of Mathematics and Informatics, Faculty of SciencesUniversity of Novi SadNovi SadSerbia

Personalised recommendations