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.
본 논문은 잘 정의된 측정치와 적용 상황에 기반해서 리펙토링 테크닉의 효과에 대해서 연구하였다.
이 연구에서는 많이 이용되고 있는 '메쏘드 추출' 기법의 복잡도를 연구하였다. 이 기법에 대해서 본 연구는 다음을 수행하였다.
먼저, 우리는 클래스 당 가중치 적용 메쏘드와 클래스 당 요청 측정치가 각각, 단일 메쏘드의 복잡도와, 메쏘드 간의 상호 작용에 의한 복잡도를 나타냄을 근거로 대표적 측정치로 채택하였다.
나아가서, 본 논문에서는 클래스 당 가중치 적용 메쏘드와 클래스 당 요구 값을 예측할 수 있는 방법을 제시하였다. 이는 코드의 중복에 관련된 속성들의 관찰에 의해서 이루어 질 수 있는데 이러한 속성은 중복의 횟수, 중복 코드 내의 복잡도, 그리고 중복 범위 (메쏘드 내, 메쏘드 간, 클래스 간)가 포함된다.
클래스 당 가중치 적용 메쏘드의 변동치는 중복 회수와 중복 코드의 복잡도에 의해서 결정된다.
클래스 당 요청 회수의 변동는 메쏘드 내의 중복에 대해서는 항상 1을 가지고 그 외의 경우에는 중복 회수와 같은 값을 가진다.
네개의 자바 기반 소프트웨어 시스템에서 실시한 십회의 실험에서 위의 예측들은 올바른 것으로 확인되었다.