Retrieving Design Pattern Usage Examples using Domain Matching

Software design patterns provide well-known solutions to recurring problems faced by developers. However, not all developers are proficient with the use of design patterns. To facilitate developers in this regard, we propose a design pattern usage examples retrieval system. The retrieval is based on analyzing the developer's development context to provide design pattern usage examples from projects that have a similar functional domain to that of the developer. In our approach, the Latent Dirichlet Allocation model is used to extract domain keywords from individual projects' source code. The domain keywords are stored in a fact repository and are used to construct the respective projects' profiles. We perform content-based retrieval by using a developer's domain keywords to retrieve only matching projects and their associated design patterns-based code (as design pattern usage examples) from the fact repository. Quantitative and qualitative analysis of the results from internal experiments and a user study indicate that our system provides fairly accurate results.

[1]  Alexander Chatzigeorgiou,et al.  Design Pattern Detection Using Similarity Scoring , 2006, IEEE Transactions on Software Engineering.

[2]  Mike McShaffry,et al.  Game Coding Complete , 2003 .

[3]  Alexander Felfernig,et al.  Basic Approaches in Recommendation Systems , 2014, Recommendation Systems in Software Engineering.

[4]  Enrico Blanzieri,et al.  Choosing the right design pattern: an implicit culture approach , 2006 .

[5]  Santonu Sarkar,et al.  Mining business topics in source code using latent dirichlet allocation , 2008, ISEC '08.

[6]  Yann-Gaël Guéhéneuc,et al.  A Simple Recommender System for Design Patterns , 2007 .

[7]  Michael I. Jordan,et al.  Latent Dirichlet Allocation , 2001, J. Mach. Learn. Res..

[8]  Kazi Sakib,et al.  Automatic Recommendation of Software Design Patterns Using Anti-patterns in the Design Phase: A Case Study on Abstract Factory , 2015, QuASoQ/WAWSE/CMCE@APSEC.

[9]  Andrea De Lucia,et al.  Using IR methods for labeling source code artifacts: Is it worthwhile? , 2012, 2012 20th IEEE International Conference on Program Comprehension (ICPC).

[10]  Vili Podgorelec,et al.  A question-based design pattern advisement approach , 2014, Comput. Sci. Inf. Syst..

[11]  Ioannis Stamelos,et al.  Using Repository of Repositories (RoRs) to Study the Growth of F/OSS Projects: A Meta-Analysis Research Approach , 2007, OSS.

[12]  Ioannis Stamelos,et al.  Building and mining a repository of design pattern instances: Practical and research benefits , 2013, Entertain. Comput..

[13]  Ioannis Stamelos,et al.  An empirical investigation on the reusability of design patterns and software packages , 2011, J. Syst. Softw..

[14]  Sushil Krishna Bajracharya,et al.  A theory of aspects as latent topics , 2008, OOPSLA.

[15]  Sarun Intakosum,et al.  Case-Based Reasoning for Design Patterns Searching System , 2013 .

[16]  Yann-Gaël Guéhéneuc,et al.  Recommendation system for design patterns in software development: An DPR overview , 2012, 2012 Third International Workshop on Recommendation Systems for Software Engineering (RSSE).

[17]  David Chenho Kung,et al.  An Expert System for Suggesting Design Patterns — A Methodology and a Prototype , 2003 .

[18]  Andrea De Lucia,et al.  How to effectively use topic models for software engineering tasks? An approach based on Genetic Algorithms , 2013, 2013 35th International Conference on Software Engineering (ICSE).