Skip to main content
Log in

An empirical study of cycles among classes in Java

  • Published:
Empirical Software Engineering Aims and scope Submit manuscript

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.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Binder RV (1999) Testing object-oriented systems: models, patterns, and tools. Addison-Wesley, Reading, Boston, MA

    Google Scholar 

  • Booch G (1991) Object oriented design with applications. Benjamin-Cummings, Redwood City, CA

    Google Scholar 

  • Booch G (1995) Object solutions: managing the object-oriented project. Addison-Wesley Longman, Redwood City, CA

    Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Chapter  Google Scholar 

  • Dijkstra EW (1968) The structure of the THE-multiprogramming system. Commun ACM 11(5):341–346

    Article  MATH  Google Scholar 

  • 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

    Article  MATH  MathSciNet  Google Scholar 

  • 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

    Article  MathSciNet  Google Scholar 

  • 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

    Google Scholar 

  • 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

    Chapter  Google Scholar 

  • 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

    Google Scholar 

  • 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

    Article  Google Scholar 

  • Lakos J (1996) Large-scale C++ software design. Addison-Wesley Longman, Redwood City, CA

    Google Scholar 

  • 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

    Chapter  Google Scholar 

  • Lindholm T, Yellin F (1999) Java Virtual Machine Specification. Addison-Wesley Longman, Boston, MA

    Google Scholar 

  • Martin RC (1996) Granularity, C++ Rep 8(10):57–62

    Google Scholar 

  • 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

    Chapter  Google Scholar 

  • 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

    Google Scholar 

  • Parnas DL (1972) On the criteria to be used in decomposing systems into modules. Commun ACM 15(12):1053–1058

    Article  Google Scholar 

  • 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

    Google Scholar 

  • Parnas DL (1996) Why software jewels are rare. Computer 29(2):57–60

    Article  Google Scholar 

  • Riel AJ (1996) Object-Oriented Design Heuristics. Addison-Wesley Longman, Boston, MA

    Google Scholar 

  • Skiena SS (1998) The algorithm design manual. Springer, Berlin Heidelberg New York

    Google Scholar 

  • Stevens WP, Myers GJ, Constantine LL (1974) Structured design. IBM Syst J 13(2):115–139

    Article  Google Scholar 

  • Szyperski C (2002) Component Software: Beyond object-oriented programming, 2nd edn. Addison-Wesley Longman, Boston, MA

    Google Scholar 

  • 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

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hayden Melton.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10664-006-9033-1

Keywords

Navigation