This thesis studies the effects of refactoring techniques in relation to aspects of software maintainability through well-defined metrics for objective assessment, and the contexts in which these effects differ.
We studied a widely used refactoring technique, ``Extract Method`` of its effects on complexity. With respect to the technique we did the following:
First, we proposed to use WMC (Weighted Methods per Class) for measuring complexity of individual method and RFC (Requests For a Class) for measuring complexity of interaction among methods.
Then we proposed methods to predict WMC and RFC based on the attributes of code redundancy - the number of duplication, the complexity in the duplicated code and the redundancy scope (within a method, inter-methods, inter-class).
We predicted the WMC variation with an application of ``Extract Method`` would be proportional to the number of redundancy and to the complexity of the redundant code.
We also predicted RFC variation with an application of ``Extract Method`` would be 1 in the method scope duplication, and will be equal to redundancy count in inter-method scope redundancy.
With ten cases in four java-based systems, we verified these predictions were correct.