Abstract
Advocates of the design principle avoid cyclic dependencies among modules have argued that cycles are detrimental to software quality attributes such as understandability, testability, reusability, buildability and maintainability, yet folklore suggests such cycles are common in real object-oriented systems. In this paper we present the first significant empirical study of cycles among the classes of 78 open- and closed-source Java applications. We find that, of the applications comprising enough classes to support such a cycle, about 45% have a cycle involving at least 100 classes and around 10% have a cycle involving at least 1,000 classes. We present further empirical evidence to support the contention these cycles are not due to intrinsic interdependencies between particular classes in a domain. Finally, we attempt to gauge the strength of connection among the classes in a cycle using the concept of a minimum edge feedback set.
Similar content being viewed by others
References
Binder RV (1999) Testing object-oriented systems: models, patterns, and tools. Addison-Wesley, Reading, Boston, MA
Booch G (1991) Object oriented design with applications. Benjamin-Cummings, Redwood City, CA
Booch G (1995) Object solutions: managing the object-oriented project. Addison-Wesley Longman, Redwood City, CA
Briand LC, Daly JW, Wüust JK (1999) A unified framework for coupling measurement in object-oriented systems. IEEE Trans Softw Eng 25(1):91–121
Briand LC, Labiche Y, Wang Y (2003) An investigation of graph-based class integration test order strategies. IEEE Trans Softw Eng 29(7):594–607
Chidamber SR, Kemerer CF (1991) Towards a metrics suite for object oriented design. In: OOPSLA ’91 Conference proceedings on Object-oriented programming systems, languages, and applications. ACM Press, New York, pp 197–211
Dijkstra EW (1968) The structure of the THE-multiprogramming system. Commun ACM 11(5):341–346
Eades P, Lin X, Smyth WF (1993) A fast and effective heuristic for the feedback arc set problem. Inf Process Lett 47(6):319–323
Foote B, Yoder JW (2000) Big ball of mud. In: Harrison N, Foote B, Rohnert H (eds) Pattern languages of program design, vol. 4. Addison-Wesley, pp 654–692
Fowler M (2001) Reducing coupling. IEEE Softw 18(4):102–104
Gil JY, Maman I (2005) Micro patterns in Java code. In: Proceedings of the 20th Annual conference on object-oriented programming, systems, languages and applications (OOPSLA’05), SIGPLAN, San Diego, California, pp 97–116
Gosling J, Joy B, Steele G, Bracha G (2000) Java language specification, second edition: the Java series. Addison-Wesley Longman, Boston, MA
Gross JL, Yellen J (2004) Handbook of graph theory. CRC Press
Grothoff C, Palsberg J, Vitek J (2001) Encapsulating objects with confined types. In: OOPSLA ’01 Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, ACM Press, New York, pp 241–255
Hashim NL, Schmidt HW, Ramakrishnan S (2005) Test order for class-based integration testing of java applications. In: QSIC, pp 11–18
Hautus E (2002) Improving Java software through package structure analysis. In: The 6th IASTED International Conference Software Engineering and Applications
Jungmayr S (2002) Identifying test-critical dependencies. In: ICSM, pp 404–413
Kung D, Gao J, Hsia P, Lin J, Toyoshima Y (1993) Design recovery for software testing of object-oriented programs. In: Proceedings of the Working Conference on Reverse Engineering, pp 202–211
Kung D, Gao J, Hsia P, Lin J, Toyoshima Y (1995) Class firewall, test order, and regression testing of object-oriented programs. J Object-oriented Program 8(2):51–65
Kung D, Gao J, Hsia P, Toyoshima Y, Chen C, Kim YS, Song YK (1995) Developing an object-oriented software testing and maintenance environment. Commun ACM 38(10):75–87
Lakos J (1996) Large-scale C++ software design. Addison-Wesley Longman, Redwood City, CA
Lehman MM, Ramil JF, Wernick PD, Perry DE, Turski WM (1997) Metrics and laws of software evolution—the nineties view. In: METRICS ’97 Proceedings of the 4th International Symposium on Software Metrics. IEEE Computer Society, Washington, DC, p 20
Lindholm T, Yellin F (1999) Java Virtual Machine Specification. Addison-Wesley Longman, Boston, MA
Martin RC (1996) Granularity, C++ Rep 8(10):57–62
Melton H (2006) On the usage and usefulness of OO design principles. In: OOPSLA ’06 Companion to the 21st ACM SIGPLAN conference on object-oriented programming languages, systems, and applications. ACM Press, New York, pp 770–771
Melton H, Tempero E (2006) Identifying refactoring opportunities by identifying dependency cycles. In: Proceedings of the 29th Australasian Computer Science Conference
Meyer B (1995) Object success: a manager’s guide to object orientation, its impact on the corporation, and its use for reengineering the software process. Prentice-Hall, Upper Saddle River, NJ
Parnas DL (1972) On the criteria to be used in decomposing systems into modules. Commun ACM 15(12):1053–1058
Parnas DL (1978) Designing software for ease of extension and contraction. In: ICSE ’78 Proceedings of the 3rd international conference on Software engineering. IEEE Press, Piscataway, NJ, pp 264–277
Parnas DL (1996) Why software jewels are rare. Computer 29(2):57–60
Riel AJ (1996) Object-Oriented Design Heuristics. Addison-Wesley Longman, Boston, MA
Skiena SS (1998) The algorithm design manual. Springer, Berlin Heidelberg New York
Stevens WP, Myers GJ, Constantine LL (1974) Structured design. IBM Syst J 13(2):115–139
Szyperski C (2002) Component Software: Beyond object-oriented programming, 2nd edn. Addison-Wesley Longman, Boston, MA
Winter M (1998) Managing object-oriented integration and regression testing. In: Presented at 6th EuroSTAR Conference
Wirth N (1995) A plea for lean software. Computer 28(2):64–68
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Melton, H., Tempero, E. An empirical study of cycles among classes in Java. Empir Software Eng 12, 389–415 (2007). https://doi.org/10.1007/s10664-006-9033-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10664-006-9033-1