Abstract

리팩토링은 내부적으로는 시스템의 품질을 개선하고, 외부적으로는 시스템의 기능을 유지하는 일종의 소프트웨어를 변경하는 과정이다. 이러한 리팩토링을 적용하여 기존 소스코드를 개선하기 위해서는 개선할 사항이 무엇인지를 아는 것이 우선이다. 이를 위해 Martin Fowler와 Kent Beck은 코드속의 나쁜 냄새(코드스멜)를 식별할 수 있는 방법을 제시 하였다. 또한 코드스멜을 탐지하고 어디에 어떤 리팩토링을 적용할 것인가를 결정하는 문제와 관련된 몇몇 연구가 발표되었다. 그러나 이러한 연구들은 코드스멜에 대한 명확한 표현이 부족하거나 한정된 코드스멜만을 탐지하는 단점이 있다. 그리고 리팩토링을 적용할 경우 행위보존을 위한 선행조건들의 표현방법이 리팩토링 절차에 포함되어 있거나 정형화되지 않아 행위보존의 모호함이 발생되는 단점을 가지고 있다. 이에 본 논문에서는 OCL을 이용하여 코드스멜의 정보를 정확히 명세화하고, OCL 번역기를 통해 코드스멜을 자동으로 탐지하여 리팩토링하는 프레임워크를 제안한다. 또한 적용사례를 통하여 자바소스코드속의 코드스멜을 OCL로 명세화하여 자동탐지하고, 리팩토링을 적용해 봄으로써 활용성과 효용성을 검증해본다. Refactoring is a kind of software modification process that improves system qualities internally but maintains system functions externally. What should be improved on the existing source codes should take precedence over the others in such a modification process using this refactoring. Martin Fowler and Kent Beck proposed a method that identifies code smells for this purpose. Also, some studies on determining what refactoring will be applied to which targets through detecting code smells in codes were presented. However, these studies have a lot of disadvantages that show a lack of precise description for such code smells and detect limited code smells only. In addition, these studies showed other disadvantages that generate ambiguity in behavior preservation due to the fact that a description method of pre-conditions for the behavior preservation is included in a refactoring process or unformalized. Thus, our study represents a precise specification of code smells using OCL and proposes a framework that performs a refactoring process through the automatic detection of code smells using an OCL interpreter. Furthermore, we perform the automatic detection in which the code smells are be specified by using OCL to the java program and verify its applicability and effectivity through applying a refactoring process.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call