Retrieving Design Pattern Usage Examples using Domain Matching

Abstract

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.

Publication
2016 23rd Asia-Pacific Software Engineering Conference (APSEC)