Does God Class Decomposition Affect Comprehensibility?

Bart Du Bois, Serge Demeyer, Jan Verelst, Tom Mens, Marijn Temmerman. Does God Class Decomposition Affect Comprehensibility?. In Peter Kokol, editor, Proceedings of the IASTED International Conference on Software Engineering, February 14-16, 2006, Innsbruck, Austria. pages 346-355, IASTED/ACTA Press, 2006.


Continuous alterations and extensions of a software system introduce so called god classes, accumulating ever more responsibilities. As god classes make essential steps in program comprehension harder, it is expected that effective and efficient techniques to resolve them will facilitate future maintenance tasks. This work reports on a laboratory experiment with 63 computer science students, in which we verified whether the decomposition of a god class using well-known refactorings can affect comprehensibility of the relevant code part. Five alternative god class decompositions were de- rived through application of refactorings, by which the responsibilities of a natural god class were increasingly split into a number of collaborating classes. Our results indicate that the derived class decompositions differed significantly with regard to the ability of students to map attributes in the class hierarchy to descriptions of the problem domain. Moreover, this effect has been found to interact with the institution in which the participants were enrolled, confirming that comprehensibility is a subjective notion for which we have to take into account people’s skills and expectations. This work indicates that improving comprehensibility is within the grasp of a single maintainer preparing for future change requests by redistributing the responsibilities of a god class using well-known refactorings.