摘要
随着软件系统的演化,其模块化结构会逐渐退化。软件重构是调整系统结构的重要手段,但哪些模块最需要重构却难以预测。提出了一种基于程序聚类技术的模块重构风险分析方法,该方法通过对目标系统进行结构聚类和语义聚类获得其参考模块化结构,然后比较现实模块化结构与参考模块化结构之间的差异,对程序模块的设计质量进行评价,识别出系统中重构风险较高的模块。实验以三个开源软件的演化历史作为研究对象,与传统的模块化度量方法进行了比较,结果表明采用所提方法获得的预测结果与实际重构活动有较好的吻合度,从而验证了该方法的有效性。
As software evolves, its modularity gradually degrades. Software refactoring is an important means for software modularity adjustment, but which modules are most in need of refactoring is difficult to predict. This paper proposes a novel approach for measuring the refactoring risk of modules by software clustering. Using structural clustering and semantic clustering, two different kinds of implied modularity views can be recovered from the imple- mentation as reference modularity. By comparing the differences between the realistic modular structure and the ref- erence modular structure, modules with high refactoring risk are identified. A comparative experiment conducted on three open source softwares shows that the predicting result produced by the proposed approach conforms well to the actual refactoring activities, indicating the effectiveness of the proposed approach.
出处
《计算机科学与探索》
CSCD
2012年第6期513-521,共9页
Journal of Frontiers of Computer Science and Technology
基金
国家自然科学基金No.60903013
国家高技术研究发展计划(863)No.2012AA011202~~
关键词
重构风险
软件模块化
程序聚类
软件度量
软件质量
refactoring risk
software modularity
software clustering
software metrics
software quality