[Paper Review] Metrics for Assessing The Design of Software Interfaces
This paper proposes three novel metrics—Interface Similarity Index (ISI), Interface Clone Index (ICI), and Interface Redundancy Index (IRI)—to detect design defects in software interfaces, such as shared similarity, cloning, and redundancy in interface hierarchies. The authors validate the metrics through an empirical study on three large Java applications, demonstrating their effectiveness in identifying refactoring candidates and improving interface design quality.
Recent studies have largely investigated the detection of class design anomalies. They proposed a large set of metrics that help in detecting those anomalies and in predicting the quality of class design. While those studies and the proposed metrics are valuable, they do not address the particularities of software interfaces. Interfaces define the contracts that spell out how software modules and logic units interact with each other. This paper proposes a list of design defects related to interfaces: shared similarity between interfaces, interface clones and redundancy in interface hierarchy. We identify and describe those design defects through real examples, taken from well-known Java applications. Then we define three metrics that help in automatically estimating the interface design quality, regarding the proposed design anomalies, and identify refactoring candidates. We investigate our metrics and show their usefulness through an empirical study conducted on three large Java applications.
Motivation & Objective
- To identify and characterize design defects specific to software interfaces, such as shared similarity, interface cloning, and redundancy in inheritance hierarchies.
- To address the gap in existing metrics, which focus on class design but overlook interface-specific issues.
- To propose automated, measurable indicators for assessing interface design quality and guiding refactoring efforts.
- To empirically evaluate the proposed metrics on real-world Java applications to validate their practical utility.
Proposed method
- The authors define three new metrics: Interface Similarity Index (ISI) to quantify syntactic and semantic similarity between interfaces.
- The Interface Clone Index (ICI) detects code clones across interfaces by comparing method signatures and return types.
- The Interface Redundancy Index (IRI) measures structural redundancy in interface hierarchies, particularly in multiple inheritance scenarios.
- The metrics are implemented as static analysis heuristics and applied to real-world Java applications using automated analysis pipelines.
- The study uses a case study approach on three large open-source Java applications to evaluate metric behavior and detect refactoring candidates.
- The metrics are evaluated based on their ability to identify design anomalies and correlate with known quality issues in interface design.
Experimental results
Research questions
- RQ1To what extent do interface design defects such as redundancy and cloning manifest in real-world Java applications?
- RQ2How effectively can the proposed metrics (ISI, ICI, IRI) detect interface-specific design anomalies?
- RQ3Can the metrics identify meaningful refactoring candidates in large-scale software systems?
- RQ4How do the metrics perform in distinguishing between benign and problematic interface structures?
Key findings
- The proposed metrics successfully detected multiple instances of interface redundancy and cloning in the studied Java applications, indicating widespread design issues.
- The Interface Similarity Index (ISI) effectively identified semantically similar interfaces that could benefit from consolidation.
- The Interface Clone Index (ICI) uncovered duplicated method structures across interfaces, suggesting potential for code reuse or abstraction.
- The Interface Redundancy Index (IRI) revealed deep inheritance hierarchies with redundant method declarations, highlighting opportunities for refactoring.
- The empirical evaluation confirmed that the metrics are practical and actionable, with clear signals for developers to improve interface design.
- The study demonstrated that interface-specific metrics are essential complements to existing class-level design metrics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.