Skip to main content
QUICK REVIEW

[Paper Review] Open Source Software: How Can Design Metrics Facilitate Architecture Recovery?

Eleni Constantinou, George Kakarontzas|arXiv (Cornell University)|Oct 10, 2011
Software Engineering ResearchComputer Science5 references6 citations
TL;DR

This paper proposes a methodology that uses design metrics and machine learning to recover architectural layers in open source Java systems by analyzing dependency structures via DAGs and correlating metrics like DIT, CBO, and WMC with layer assignments. Results show that metrics such as DIT, CBO, and RFC are significantly correlated with architectural layers, enabling partial but meaningful layer prediction, though accuracy varies across layers and systems.

ABSTRACT

Modern software development methodologies include reuse of open source code. Reuse can be facilitated by architectural knowledge of the software, not necessarily provided in the documentation of open source software. The effort required to comprehend the system's source code and discover its architecture can be considered a major drawback in reuse. In a recent study we examined the correlations between design metrics and classes' architecture layer. In this paper, we apply our methodology in more open source projects to verify the applicability of our method. Keywords: system understanding; program comprehension; object-oriented; reuse; architecture layer; design metrics;

Motivation & Objective

  • To investigate whether design metrics can facilitate architecture recovery in open source software where documentation is often incomplete.
  • To develop a methodology based on static analysis and machine learning to predict architectural layers from code metrics.
  • To validate the approach on four large open source Java systems: JabRef, Jbpm, RapidMiner, and SweetHome3D.
  • To assess the predictive power of Chidamber and Kemerer metrics in identifying functional layers such as UI, Controllers, Business Logic, and Infrastructure.
  • To improve software reuse by enabling developers to infer system architecture without full documentation.

Proposed method

  • Construct a Directed Acyclic Graph (DAG) from static analysis to derive D-layers, representing dependency hierarchies in the system.
  • Use the ckjm tool to compute eight Chidamber and Kemerer (C&K) design metrics: WMC, DIT, NOC, CBO, RFC, LCOM, Ca, and NPM for each class.
  • Apply JRip, a rule-based machine learning classifier, to generate classification rules linking metric values to architectural layers.
  • Form tentative architectural layers by grouping consecutive D-layers and evaluate predictions using precision and recall metrics.
  • Analyze correlation matrices between design metrics and D-layers to identify metrics most predictive of architectural roles.
  • Validate results across four open source systems using descriptive statistics, correlation analysis, and classification accuracy.

Experimental results

Research questions

  • RQ1Can design metrics such as DIT, CBO, and WMC effectively predict architectural layers in open source systems?
  • RQ2How well do machine learning models trained on design metrics recover known architectural layer structures?
  • RQ3Which design metrics show the strongest statistical correlation with architectural layer assignments?
  • RQ4To what extent can D-layers derived from dependency analysis serve as a proxy for architectural layering?
  • RQ5Why do some architectural layers (e.g., D-layer 4) show poor classification performance despite metric correlations?

Key findings

  • DIT, CBO, RFC, LCOM, and Ca showed significant correlations with architectural layers across all four systems, indicating their relevance for architecture recovery.
  • For User Interface classes (D-layer 4), rules indicated low LCOM and low/medium DIT, aligning with their role in user interaction.
  • Controller classes (D-layer 3) were predicted by rules favoring low CBO and Ca, consistent with their role in mediating UI and business logic.
  • Business Logic classes (D-layer 2) were associated with higher CBO and WMC, supporting the hypothesis of complex interactions and responsibilities.
  • Infrastructure classes (D-layer 1) were predicted by low CBO and RFC, reflecting their role in data storage and minimal public interface.
  • Classification accuracy varied: JabRef achieved 0.727 precision and 0.5 recall for D-layer 2, while SweetHome3D had 1.0 precision but only 0.009 recall for D-layer 2, indicating inconsistent performance across systems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.