Evaluating the Dependency Between Cyclomatic Complexity and Response For Class
Fuente:
arXiv
Salvato in:
| Autori principali: | , |
|---|---|
| Natura: | Preprint |
| Pubblicazione: |
2024
|
| Soggetti: | |
| Accesso online: | |
| Tags: |
Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
|
| _version_ | 1866910641470570496 |
|---|---|
| author | Stavtsev, Maxim Bugayenko, Yegor |
| author_facet | Stavtsev, Maxim Bugayenko, Yegor |
| contents | 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). |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2410_06416 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Evaluating the Dependency Between Cyclomatic Complexity and Response For Class Stavtsev, Maxim Bugayenko, Yegor Software Engineering 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). |
| title | Evaluating the Dependency Between Cyclomatic Complexity and Response For Class |
| topic | Software Engineering |
| url | https://arxiv.org/abs/2410.06416 |