On the automation of dependency-breaking refactorings in Java : a thesis presented in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Computer Science at Massey University, Palmerston North, New Zealand
Over a period of time software systems grow large and become complex due to unsystematic
changes that create a high level of interconnection among software artefacts.
Consequently, maintenance becomes expensive and even making small changes
may require considerable resources due to change propagation in the system, a phenomenon
known as ripple e ects. Industrial evidence suggests that more resources are
spent on the maintenance phase than on the initial development. It is evident that
companies make huge investments to maintain legacy systems until a point comes
where a complete restructuring of the system is required. In most cases, it becomes
very expensive to refurbish legacy systems manually due to their inherent complexity.
Several semi-automated solutions have been proposed to restructure simplified models
of existing systems. It is still expensive, in terms of resources, to translate those
model level transformations into source code transformations or refactorings. The
question that arises here is whether we can automate the application of model level
changes on the source code of programs.
In this thesis, we have developed novel algorithms to automate the application of
a class of architectural transformations related to improving modularity of existing
programs. In order to evaluate our approach, we have analysed a large dataset of open
source programs to determine whether the manipulation of models can be translated
into source code refactorings, whether we can define constraints on those refactorings
to preserve program correctness, and to which extent the automation of the whole
process is possible. The results indicate that this automation process can be achieved
to a significant level, which implies that certain economic benefits can be gained from