为解决标准设计模式演化后难以检测的问题,引入设计模式变体思想,以Bridge模式为例,给出了八种常用的变体实现,并以人工形式挖掘了四种开源系统中Bridge模式变体的基准数,接着在Apache Ant 1.6.2与J Hot Draw 5.1开源系统中通过六种主流设计模式检测工具进行了变体检测实验。实验结果表明,FCA-CBR方法简单有效,对两种开源系统中Bridge模式变体检测的精确率达到60%与48.1%,与先前方法相比有了较大的提高。
To solve hard detection of standard design pattern evolution, this paper introduced variants ideology of design pattern, and took the Bridge pattern as examples, focusing on eight variants of the Bridge pattern, manual work mined benchmark of four open source system. It used six kinds of design pattern detection tools to carry out the variation test based on Apache Ant 1.6.2 open source system and JHotDraw 5.1 open source system. The experimental results show that the accuracy of the FCA-CBR detection method is between 60% and 48.1% of Apache Ant 1.6.2 open source system and JHotDraw 5.1 open source system, and has certainly increased the recognition accuracy.