ASE2020
Predicting software design patterns from text using neural embedding
Laksri Wijerathna, Aldeida Aleti
被引用 1 次
摘要
Software design patterns are solutions to common software problems that are proven to work adequately in particular scenarios. Deciding which design pattern to use for a given software problem often requires practical knowledge acquired with experience in a similar domain and can be highly subjective and error-prone. Further, for novice programmers, an automated approach would be of tremendous help as it would provide practical knowledge required for deciding which design pattern to use for a particular software problem. The majority of research in software design pattern prediction involves using software structure and features in determining which design pattern to implement. However, there are circumstances where software engineers would prefer to know which design pattern to be used by looking at the design problem during or before the implementation phase. Existing design pattern prediction tools cannot be utilized in this scenario due to the absence of code and class structures. To address this issue, this paper proposes a new approach that analyzes the context of the software problem from text and predicts a suitable design pattern for the given problem context using feature learning, neural embedding, and classification. We evaluate our approach on a case study from Stack Overflow with more than 66,000 questions that discuss problems and consequences related to 23 design patterns. Results show that our approach can predict design patterns from the text with 82% overall accuracy.