Table of Contents
Fetching ...

Java Classes with "-Er" and "-Utils" Suffixes Have Higher Complexity

Anna Sukhova, Alexey Akhundov, Efim Verzakov, Yegor Bugayenko

TL;DR

This work analyzed complexity and cohesion of 13,861 Java classes from 212 unique open-source GitHub repositories and found out that average values of Cyclomatic Complexity and Cognitive Complexity metrics are at least 2.5 times higher when suffixes are present.

Abstract

In object-oriented programming languages, a belief exists that classes with -Er/-Or and -Utils suffixes are "code smells" because they take over a lot of functional responsibility, turning out to be bulky and complicated, and therefore making it more difficult to maintain the code. In order to validate this intuition, we analyzed complexity and cohesion of 13,861 Java classes from 212 unique open-source GitHub repositories. We found out that average values of Cyclomatic Complexity and Cognitive Complexity metrics are at least 2.5 times higher when suffixes are present.

Java Classes with "-Er" and "-Utils" Suffixes Have Higher Complexity

TL;DR

This work analyzed complexity and cohesion of 13,861 Java classes from 212 unique open-source GitHub repositories and found out that average values of Cyclomatic Complexity and Cognitive Complexity metrics are at least 2.5 times higher when suffixes are present.

Abstract

In object-oriented programming languages, a belief exists that classes with -Er/-Or and -Utils suffixes are "code smells" because they take over a lot of functional responsibility, turning out to be bulky and complicated, and therefore making it more difficult to maintain the code. In order to validate this intuition, we analyzed complexity and cohesion of 13,861 Java classes from 212 unique open-source GitHub repositories. We found out that average values of Cyclomatic Complexity and Cognitive Complexity metrics are at least 2.5 times higher when suffixes are present.
Paper Structure (7 sections, 3 equations, 4 figures, 3 tables)

This paper contains 7 sections, 3 equations, 4 figures, 3 tables.

Figures (4)

  • Figure 1: The average values of total LCOM5 for three groups of Java classes, not taking into account class constructors.
  • Figure 2: The average values of total NHD for three groups of Java classes, not taking into account class constructors.
  • Figure 3: The average values of total CoCo for three groups of Java classes: the classes with " -Er -Er / -Or -Or " and " -Utils -Utils " suffixes are at least 2.5 times more complex.
  • Figure 4: The average values of total CC for three groups of Java classes: the classes with " -Er -Er / -Or -Or " and " -Utils -Utils " suffixes are at least 2.5 times more complex.