软件重构是改造软件遗留系统、软件重用的重要手段。代码味道用于描述软件设计缺陷,检测代码味道是软件重构的重要步骤。按照代码味道的特征给代码味道分类,对引发重构的主要缺陷一一类之间结构型代码味道,给出了自动化检测的原理,设计和实现了一个检测工具。
Refactoring is a key means to transform the legacy system and for software reuse. Code smells are used to describe design defect in software. To detect them is an important step of refactoring, This paper classifies the code smells by their characters and proposes a method to automatically detect one of the type-structural smells between classes. The design and the implementation of an automatic detect tool by using this method are introduced.