A Methodology to Automate the Selection of Design Patterns
Shahid Hussain, Jacky Keung, Arif Ali Khan, Kwabena Ebo Bennin · 2016
Background: Over the last two decades, numerous software design patterns have been introduced and cataloged on the basis of developer's interest and skills. Motivation: In software design phase, inexperienced designers are mostly concerned on how to select an appropriate design pattern from the catalog of relevant patterns in order to solve a design problem. The existing automated design pattern selection methodologies are limited to the need of formal specification of design patterns or an appropriate sample size to make the learning process more effective. Method: To address this concern, we propose a three step methodology to automate the selection process of design pattern for a design problem. The steps of the methodology are text preprocessing, use of an unsupervised learning technique (that is Fuzzy c-Mean) as a core function to quantitatively determine the resemblance of different objects and selection of most appropriate pattern for a design problem. We evaluate our methodology with two samples that is Gang-of-Four (GoF) design pattern and spoiled pattern collection, and three object-oriented related design problems. Moreover, we used Fuzzy Silhouette test, Kappa (k) test, Cosine Similarity and argmax function to measure the effectiveness of our methodology. Results: In case of GoF pattern collection, we validated the reliability of Fuzzy c-Mean (FCM) results using a classification decision tree, and observed promising results compared to other automation techniques. Conclusion: From the comparison results, we observed 11%, 4% and 18% improvement in the performance of proposed technique as compared to supervised learning techniques of Support Vector Machine, Naïve Bayes and C4.5 respectively.