Abstract:
Refactoring is a key technique to acquire software quality. The traditional method of locating refactoring mostly relies on observations and subjective perceptions, which is inefficient. A method of locating refactoring based on slice metrics is proposed. It uses coarse-grained slice to measure the coupling of class and locate the classes which need refactoring. A case demonstrates that the method is efficient, and outperforms the conventional method.
Key words:
coarse-grained slice,
degree of coupling,
refactoring location,
Weighted Class Dependent Graph(WCDG)
摘要: 重构是提高代码质量的一项关键技术,传统的定位重构代码依赖开发者的观察和主观意识,效率较低。为此,将切片思想引入到重构定位中,提出一种基于切片度量的重构定位方法。该方法利用粗粒度切片度量软件系统中类和类之间的耦合度,并根据度量结果识别类间的“坏味道”,从而定位需要重构的类。实例研究表明,与其他方法相比,该方法能获得更优的性能。
关键词:
粗粒度切片,
耦合度,
重构定位,
赋权类依赖图
CLC Number:
HUANG Ya-Jing, GAO Jian-Hua. Refactoring Location Method Based on Coarse-grained Slice Metrics[J]. Computer Engineering, 2011, 37(11): 80-82.
黄雅菁, 高建华. 基于粗粒度切片度量的重构定位方法[J]. 计算机工程, 2011, 37(11): 80-82.