Advertisement

Empirical Software Engineering

, Volume 12, Issue 4, pp 389–415 | Cite as

An empirical study of cycles among classes in Java

  • Hayden Melton
  • Ewan Tempero
Article

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.

Keywords

Dependency cycles Java Software corpus Program analysis Object-oriented design 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Binder RV (1999) Testing object-oriented systems: models, patterns, and tools. Addison-Wesley, Reading, Boston, MAGoogle Scholar
  2. Booch G (1991) Object oriented design with applications. Benjamin-Cummings, Redwood City, CAGoogle Scholar
  3. Booch G (1995) Object solutions: managing the object-oriented project. Addison-Wesley Longman, Redwood City, CAGoogle Scholar
  4. 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–121CrossRefGoogle Scholar
  5. Briand LC, Labiche Y, Wang Y (2003) An investigation of graph-based class integration test order strategies. IEEE Trans Softw Eng 29(7):594–607CrossRefGoogle Scholar
  6. 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–211CrossRefGoogle Scholar
  7. Dijkstra EW (1968) The structure of the THE-multiprogramming system. Commun ACM 11(5):341–346zbMATHCrossRefGoogle Scholar
  8. Eades P, Lin X, Smyth WF (1993) A fast and effective heuristic for the feedback arc set problem. Inf Process Lett 47(6):319–323zbMATHCrossRefMathSciNetGoogle Scholar
  9. 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–692Google Scholar
  10. Fowler M (2001) Reducing coupling. IEEE Softw 18(4):102–104CrossRefMathSciNetGoogle Scholar
  11. 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–116Google Scholar
  12. Gosling J, Joy B, Steele G, Bracha G (2000) Java language specification, second edition: the Java series. Addison-Wesley Longman, Boston, MAGoogle Scholar
  13. Gross JL, Yellen J (2004) Handbook of graph theory. CRC PressGoogle Scholar
  14. 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–255CrossRefGoogle Scholar
  15. Hashim NL, Schmidt HW, Ramakrishnan S (2005) Test order for class-based integration testing of java applications. In: QSIC, pp 11–18Google Scholar
  16. Hautus E (2002) Improving Java software through package structure analysis. In: The 6th IASTED International Conference Software Engineering and ApplicationsGoogle Scholar
  17. Jungmayr S (2002) Identifying test-critical dependencies. In: ICSM, pp 404–413Google Scholar
  18. 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–211Google Scholar
  19. 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–65Google Scholar
  20. 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–87CrossRefGoogle Scholar
  21. Lakos J (1996) Large-scale C++ software design. Addison-Wesley Longman, Redwood City, CAGoogle Scholar
  22. 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 20CrossRefGoogle Scholar
  23. Lindholm T, Yellin F (1999) Java Virtual Machine Specification. Addison-Wesley Longman, Boston, MAGoogle Scholar
  24. Martin RC (1996) Granularity, C++ Rep 8(10):57–62Google Scholar
  25. 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–771CrossRefGoogle Scholar
  26. Melton H, Tempero E (2006) Identifying refactoring opportunities by identifying dependency cycles. In: Proceedings of the 29th Australasian Computer Science ConferenceGoogle Scholar
  27. 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, NJGoogle Scholar
  28. Parnas DL (1972) On the criteria to be used in decomposing systems into modules. Commun ACM 15(12):1053–1058CrossRefGoogle Scholar
  29. 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–277Google Scholar
  30. Parnas DL (1996) Why software jewels are rare. Computer 29(2):57–60CrossRefGoogle Scholar
  31. Riel AJ (1996) Object-Oriented Design Heuristics. Addison-Wesley Longman, Boston, MAGoogle Scholar
  32. Skiena SS (1998) The algorithm design manual. Springer, Berlin Heidelberg New YorkGoogle Scholar
  33. Stevens WP, Myers GJ, Constantine LL (1974) Structured design. IBM Syst J 13(2):115–139CrossRefGoogle Scholar
  34. Szyperski C (2002) Component Software: Beyond object-oriented programming, 2nd edn. Addison-Wesley Longman, Boston, MAGoogle Scholar
  35. Winter M (1998) Managing object-oriented integration and regression testing. In: Presented at 6th EuroSTAR ConferenceGoogle Scholar
  36. Wirth N (1995) A plea for lean software. Computer 28(2):64–68CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2007

Authors and Affiliations

  1. 1.Department of Computer ScienceUniversity of AucklandAucklandNew Zealand

Personalised recommendations