Among the code structuration mechanisms in object oriented systems, class hierarchies based on the generalization relationship play a prominent role. Indeed it is used to represent and code hierarchies of abstractions supposed to help with code understanding, maintenance and extension. But it is common to see class hierarchies and the associated inheritance mechanism be diverted from this noble role to become a mere code sharing mechanism. In this case, rather than helping, the inheritance mechanism confuses the understanding of the code. Hence, we have developed a metric to analyze the inheritance mechanism at work in a running system, what we have called the inheritance pattern. Although the metrics measuring inheritance are numerous, our approach is original since it observes the actual inheritance in the running code at the class level as well as among the packages (i.e. among the classes through package). In some sense, this metric measures how well the inheritance mechanism has been leveraged in the software. But interpreting raw numbers can be hard. Then we developed a visual and hierarchical representation of the metric values at the scale of a whole system. This helps to assess the quality of the code from the point of view of code abstraction.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.