Modularizing Legacy System through an Improved Bunch Clustering Method in Cloud Migration

Junfeng Zhao, Jiantao Zhou, Hongji YangInternational Journal of Grid and Distributed Computing 2015 · DOI

Abstract

As a new service mode in cloud computing, SaaS (software as a service) brings many attractive advantages. Legacy systems can be revived through being reengineered to SaaS. In order to achieve reengineering, the analysis and understanding to legacy systems are essential. For this goal, an improved Bunch clustering system is proposed to implement automatic modularization to object-oriented software systems so as to help engineer understand legacy system, including introduction of modular dependency graph with relationship type information, adaptation to initial partition and adjustment to modularization quality. The experiment results show that the improvement of Bunch clustering system is effective. The improved Bunch clustering system can make the clustering results more stable and consistent to the benchmarks.

Introduction

Migrating legacy software to the cloud—specifically to a Software-as-a-Service (SaaS) model—requires a deep understanding of the system's existing architecture. Since documentation for older systems is often missing or outdated, researchers use "architecture recovery" tools to automatically group code into logical modules.

A popular tool for this is Bunch, which uses search-based clustering to partition a system based on a Modular Dependency Graph (MDG). However, the original Bunch treats all connections between classes as equal. In object-oriented programming, an "Inheritance" relationship implies much stronger cohesion than a simple "Dependency." By ignoring these nuances, the original Bunch often produces unstable results or partitions that lack architectural sense. This paper presents an enhanced Bunch clustering method that incorporates relationship types to improve modularization quality and stability.

Methodology

The proposed improvements to the Bunch clustering method focus on three primary adaptations:

1. Relationship-aware MDG (R-MDG)

Instead of a simple graph, the system uses a directed graph where edges are labeled by type: Inheritance (G), Realization (I), Association (A), or Dependency (D).

2. Weighted Modularization Quality (MQ)

The algorithm’s fitness function (MQ) was redefined to prioritize "strongly bonded" classes. Numerical weights are assigned to relationship types: Inheritance (1.5), Realization (1.4), Association (1.2), and Dependency (1.0).

Mathematical formulation for the Relationship-aware Modularization Quality (MQ) metric.

3. Smart Initial Partitioning and Search Optimization

Standard Bunch starts with a random partition, which is computationally inefficient. The improved method starts by automatically grouping classes linked by high-cohesion relationships (Inheritance and Realization). Additionally, a heuristic search optimization limits the number of neighbor partitions calculated in each iteration to 80%, saving processing time.

Experimental Evaluation

The researchers evaluated their tool using GeoScope, an open-source Java toolkit for geographical analysis. The system consists of 56 classes and 134 discovered relationships. A "ground truth" reference decomposition was created by analyzing GeoScope’s official documentation, which divided the system into 13 functional modules.

Results and Discussion

The improved algorithm was compared against the original Bunch over 100 experimental runs. Key results include:

  • Accuracy: MoJo distance measurements showed accuracy improvements of approximately 18-20%.
  • Efficiency: The improved algorithm was significantly faster, saving 20.8% to 37.3% in clustering time.
  • Stability: As shown in the experimental data, the number of clusters in the result and the MQ value remained very consistent across runs, whereas the original Bunch results fluctuated significantly.
Clustering results for 10 runs with a fixed initial partition, showing high stability in MQ and cluster count.

Conclusion and Future Work

The improved Bunch clustering method provides a more stable and accurate approach to modularizing legacy systems for cloud migration. Future work will address granularity control to ensure modules are of a practical size for developers and test the tool on larger, more complex industrial systems. Additionally, automating the weight-tuning process for relationship types remains a key area for future research.

Summary updated

Abstract

As a new service mode in cloud computing, SaaS (software as a service) brings many attractive advantages. Legacy systems can be revived through being reengineered to SaaS. In order to achieve reengineering, the analysis and understanding to legacy systems are essential. For this goal, an improved Bunch clustering system is proposed to implement automatic modularization to object-oriented software systems so as to help engineer understand legacy system, including introduction of modular dependency graph with relationship type information, adaptation to initial partition and adjustment to modularization quality. The experiment results show that the improvement of Bunch clustering system is effective. The improved Bunch clustering system can make the clustering results more stable and consistent to the benchmarks.
BibTeX
@article{zhao2015modularizing,
  author = {Junfeng Zhao and Jiantao Zhou and Hongji Yang},
  title = {{Modularizing Legacy System through an Improved Bunch Clustering Method in Cloud Migration}},
  journal = {International Journal of Grid and Distributed Computing},
  year = {2015},
  doi = {10.14257/ijgdc.2015.8.4.01},
}

Loading related content...

Figure