PPIG 2008 - 20th Annual Workshop
A Longitudinal study of Depth of Inheritance and its effects on programmer maintenance effort
Adrian Creegan, Chris Exton
Abstract: Inheritance is a defining feature of the object oriented paradigm. Amongst other things, it enables the programmer to establish conceptual relations between domain objects, and promotes the partitioning of systems to increase reuse and dynamic extension. That notwithstanding, it has received some criticism especially in relation to the burden of comprehension it imposes on maintainers. As a result, measurements of this code feature have been incorporated into several established metrics as contributing to the level of predicted effort.
The question of its negative impact on maintenance effort is not a new one, indeed it has been revisited several times over the past 15 years. However, there is little hard empirical evidence quantifying its effects. Much of the previous research arrives at inconclusive and in some cases contradictory findings. While some of these previous studies have a strong empirical foundation, the maintenance tasks investigated have by and large been confined to small and somewhat idealised source code bases. Furthermore, many of these studies were performed in laboratory settings employing students as experimental subjects. They may not therefore be representative of typical maintenance scenarios.
This paper attempts to re-examine this subject. It is hoped, that the methodology employed will enable its findings to be more extensible to production situations. To this end, a large open source project was chosen as a subject for study. Data was extracted from this project using repository mining techniques by means of several custom tools which are discussed. These tools established the inheritance hierarchies of the source code and captured their evolution over a time frame of six years. The resulting data was then statistically analysed. Special attention was paid to establishing the presence of large scale restructuring operations. Such operations have been predicted as a strategy to cope with accumulating conceptual discrepancies in maintained software.
The study found that while such a signature was present, it was most likely due to seasonal effects. The depth of inheritance of associated code could not be correlated with this signature to any significant degree. A functional relationship between the number of file revisions and their distribution within the repository was also observed. This along with the previous results is presented and discussed.