The impact of inheritance depth on maintenance tasks – Detailed description and evaluation of two experiment replications

  • Name:

    Technical Article

  • Author:

    Lutz Prechelt
    Barbara Unger

  • Summary

    Inheritance is one of the main concepts of object-oriented technology. It is claimed that the use of inheritance improves productivity and decreases development time. John Daly et al. reported on two experiments evaluating the effects of inheritance depth on program maintenance. They found that maintenance was performed significantly quicker for software using three levels of inheritance, compared to equivalent ‘flattened’ software without inheritance. A second experiment found that maintenance for software using five levels of inheritance tended to be slightly slower than for equivalent software without inheritance. We report on similar experiments on the same question. Our results contradict those mentioned above. Several crucial changes were made to the setup. In particular longer and more complex programs were used, an inheritance diagram was available to the subjects, and we used more and different kinds of maintenance tasks. Furthermore, our experiment design compares zero level, three level and five level inheritance directly in one experiment. The results suggest that there is a tendency that deeper inheritance may complicate program understanding. But the effect depends rather on other factors such as complexity of the program and type of maintenance task than on inheritance depth. We found a high correlation between maintenance time and the number of methods to trace to gain program understanding. Further work should be done to identify other influence factors.

    Bibtex

    @techreport{,
    author={Lutz Prechelt, Barbara Unger},
    title={The impact of inheritance depth on maintenance tasks – Detailed description and evaluation of two experiment replications},
    year=1998,
    month=Jul,
    url={http://ps.ipd.kit.edu/downloads/ta_1998_impact_inheritance_depth_maintenance_task.pdf},
    abstract={Inheritance is one of the main concepts of object-oriented technology. It is claimed that the use of inheritance improves productivity and decreases development time. John Daly et al. reported on two experiments evaluating the effects of inheritance depth on program maintenance. They found that maintenance was performed significantly quicker for software using three levels of inheritance, compared to equivalent ‘flattened’ software without inheritance. A second experiment found that maintenance for software using five levels of inheritance tended to be slightly slower than for equivalent software without inheritance. We report on similar experiments on the same question. Our results contradict those mentioned above. Several crucial changes were made to the setup. In particular longer and more complex programs were used, an inheritance diagram was available to the subjects, and we used more and different kinds of maintenance tasks. Furthermore, our experiment design compares zero level, three level and five level inheritance directly in one experiment. The results suggest that there is a tendency that deeper inheritance may complicate program understanding. But the effect depends rather on other factors such as complexity of the program and type of maintenance task than on inheritance depth. We found a high correlation between maintenance time and the number of methods to trace to gain program understanding. Further work should be done to identify other influence factors.},
    organization={Universität Karlsruhe, Fakultät für Informatik},
    pages={177},
    }
  • In:

    Universität Karlsruhe, Fakultät für Informatik 

  • Year:

    1998

  • Links:
Associated Project
Title