Cluster analysis of object-oriented programs : a thesis presented in partial fulfilment of the requirements for the degree of Master of Science in Computer Science at Massey University, Palmerston North, New Zealand
In this thesis we present a novel approach to the analysis of dependency graphs
of object-oriented programs, and we describe a tool that has been implemented
for this purpose. A graph-theoretical clustering algorithm is used in order
to compute the modular structure of programs. This can be used to assist
software engineers to redraw component boundaries in software in order to
improve the level of reuse and maintainability.
The analysis of the dependency graph of an object-oriented program is
useful for assessing the quality of software design. The dependency graph
can be extracted from a program using various different methods, including
source code, byte code, and dynamic (behavioral) analysis. The nodes in the
dependency graph are classes, members, packages and other artifacts, while
the edges represent uses and extends relationships between those artifacts.
Once the dependency graph has been extracted, it can be analysed in order to
quantify certain characteristics of the respective program. Examples include
the detection of circular dependencies and measurements of the responsibility
or independence of units based on their relationships. Tools like JDepend1
implementing these principles have become very popular in recent years.
Our work includes grouping types in dependency graphs using di erent
Grouping into namespaces;
Grouping into clusters using graph clustering algorithms;
Grouping into clusters using rules.
The detected mismatches are candidates for refactoring.
We have developed a tool for processing dependency graphs clustering and
producing results where users can outline possible design violations.