Evaluating the Dependency Between Cyclomatic Complexity and Response For Class
Maxim Stavtsev, Yegor Bugayenko

TL;DR
This study investigates the relationship between class size and complexity in object-oriented programming, finding a strong correlation between the number of methods and overall class complexity in Java classes.
Contribution
It provides empirical evidence linking class size to complexity, supporting design principles for maintainable object-oriented code.
Findings
Strong correlation (0.79) between cyclomatic complexity and number of methods.
Analysis of over 860,000 Java classes from GitHub.
Supports the hypothesis that smaller classes are less complex.
Abstract
In object-oriented programming, it is reasonable to hypothesize that smaller classes with fewer methods are less complex. Should this hypothesis hold true, it would be advisable for programmers to design classes with fewer methods, as complexity significantly contributes to poor maintainability. To test this assumption, we analyzed 862,517 Java classes from 1,000 open GitHub repositories. Our findings indicate a strong Pearson correlation of 0.79 between the cumulative McCabe's Cyclomatic Complexity (CC) of all class methods and the number of methods, a metric known as Response for Class (RFC).
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsImage Processing Techniques and Applications
