skip to main content
article

An empirical study of cycles among classes in Java

Published: 01 August 2007 Publication History

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 .

References

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

Cited By

View all
  • (2024)Bloat beneath Python’s Scales: A Fine-Grained Inter-Project Dependency AnalysisProceedings of the ACM on Software Engineering10.1145/36608211:FSE(2584-2607)Online publication date: 12-Jul-2024
  • (2024)An empirical study of untangling patterns of two-class dependency cyclesEmpirical Software Engineering10.1007/s10664-023-10438-029:2Online publication date: 12-Mar-2024
  • (2023)Progress on class integration test order generation approachesInformation and Software Technology10.1016/j.infsof.2022.107133156:COnline publication date: 1-Apr-2023
  • Show More Cited By

Recommendations

Reviews

Alexandre Bergel

The presence of cycling dependencies in object-oriented (OO) programs, despite a wealth of well-thought-out recommendations and books about good software engineering practices, is hardly a controversial fact. This paper presents a careful analysis on cycles in software programs. As argued by Melton and Tempero, these cycles may be huge, involving more than 1,000 classes. The analysis involves 78 applications that vary in size, domain, origin, and development mode; therefore, the presented results are likely to have general applicability. How such a situation occurred is the natural question that follows the reading. Criteria that favor cycles are probably innumerable; I mention but some: degree of openness in the development, the way changes and fixes are elected to be incorporated into a mainstream line, and the presence of quality assessment tools. This last criterion is critical since programmers have little feedback on whether a change or a fix has increased or reduced cycles, and a 1,000-class cycle can certainly not be the subject of consideration by a single programmer. This is a good paper. It demonstrates that software engineering is a difficult task, and efforts to produce a quality development environment should be maintained, if not increased. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Empirical Software Engineering
Empirical Software Engineering  Volume 12, Issue 4
August 2007
115 pages

Publisher

Kluwer Academic Publishers

United States

Publication History

Published: 01 August 2007

Author Tags

  1. Dependency cycles
  2. Java
  3. Object-oriented design
  4. Program analysis
  5. Software corpus

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 01 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Bloat beneath Python’s Scales: A Fine-Grained Inter-Project Dependency AnalysisProceedings of the ACM on Software Engineering10.1145/36608211:FSE(2584-2607)Online publication date: 12-Jul-2024
  • (2024)An empirical study of untangling patterns of two-class dependency cyclesEmpirical Software Engineering10.1007/s10664-023-10438-029:2Online publication date: 12-Mar-2024
  • (2023)Progress on class integration test order generation approachesInformation and Software Technology10.1016/j.infsof.2022.107133156:COnline publication date: 1-Apr-2023
  • (2023)Language usage analysis for EMF metamodels on GitHubEmpirical Software Engineering10.1007/s10664-023-10368-x29:1Online publication date: 13-Dec-2023
  • (2022)A search-based approach for detecting circular dependency bad smell in goal-oriented modelsSoftware and Systems Modeling (SoSyM)10.1007/s10270-021-00965-z21:5(2007-2037)Online publication date: 1-Oct-2022
  • (2020)Towards an order-aware object comparisonProceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity10.1145/3427081.3427090(64-71)Online publication date: 19-Oct-2020
  • (2018)An effective approach for determining the class integration test order using reinforcement learningApplied Soft Computing10.1016/j.asoc.2018.01.04265:C(517-530)Online publication date: 1-Apr-2018
  • (2014)Improving software through automatic untangling of cyclic dependenciesCompanion Proceedings of the 36th International Conference on Software Engineering10.1145/2591062.2591182(155-164)Online publication date: 31-May-2014
  • (2013)Bootstrapping software distributionsProceedings of the 16th International ACM Sigsoft symposium on Component-based software engineering10.1145/2465449.2465461(131-142)Online publication date: 17-Jun-2013
  • (2013)How (and why) developers use the dynamic features of programming languagesEmpirical Software Engineering10.1007/s10664-012-9203-218:6(1156-1194)Online publication date: 1-Dec-2013
  • Show More Cited By

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media