个人信息Personal Information
教授
博士生导师
硕士生导师
任职 : 软件工程研究所副所长
性别:男
毕业院校:大连理工大学
学位:博士
所在单位:软件学院、国际信息与软件学院
电子邮箱:zren@dlut.edu.cn
Mining Design Pattern Use Scenarios and Related Design Pattern Pairs: A Case Study on Online Posts
点击次数:
论文类型:期刊论文
发表时间:2021-01-10
发表刊物:JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY
卷号:35
期号:5,SI
页面范围:963-978
ISSN号:1000-9000
关键字:design pattern; software documentation; Stack Overflow; topic model
摘要:In common design pattern collections, e.g., design pattern books, design patterns are documented with templates that consist of multiple attributes, such as intent, structure, and sample code. To adapt to modern developers, the depictions of design patterns, especially some specific attributes, should advance with the current programming technologies, for example, "known uses", which exemplifies the use scenarios of design patterns in practice, and "related patterns", which describes the relatedness between a design pattern and the others within a context. However, it is not easy to update the contents of these attributes manually due to the diversity of the programming technologies. To address this problem, in this work, we conducted a case study to mine design pattern use scenarios and related design pattern pairs from Stack Overflow posts to enrich the two attributes. We first extracted the question posts relevant to each design pattern by identifying the design pattern tags. Then, the topics of the posts were discovered by applying topic modeling techniques. Finally, by analyzing the topics specified for each design pattern, we detected 195 design pattern use scenarios and 70 related design pattern pairs, involving 61 design patterns totally. These findings are associated with a variety of popular software frameworks and programming techniques. They could complement the existing design pattern collections and help developers better acknowledge the usage and relatedness of design patterns in today's programming practice.