Analysis of high structural class coupling in object-oriented software systems
- 268 Downloads
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.
KeywordsHigh coupling Class collaboration networks Network analysis Software metrics Power-law Class reuse Class aggregation
Mathematics Subject Classification05C82 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.
- 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
- 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
- 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
- 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.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
- 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.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