论文标题

基于功能的软件设计模式检测

Feature-Based Software Design Pattern Detection

论文作者

Nazar, Najam, Aleti, Aldeida, Zheng, Yaokun

论文摘要

软件设计模式是软件设计和体系结构中常见问题的标准解决方案。知道特定的模块实现设计模式是设计理解的快捷方式。因此,手动检测设计模式是一项耗时且具有挑战性的任务,因此,研究人员提出了自动设计模式检测技术。但是,对于某些设计模式,这些技术显示出低性能。在这项工作中,我们引入了一种设计模式检测方法,DPD_F通过将代码功能与机器学习分类器一起自动训练设计模式检测器,从而改善了最先进的性能。 DPD_F使用代码功能和呼叫图创建Java源代码的语义表示,并在语义表示上应用\ textit {Word2Vec}算法,以构建Java源代码的单词空间几何模型。 DPD $ _F $然后构建在标记的数据集上培训的机器学习分类器,并识别具有超过80%精度和79 \%召回的软件设计模式。此外,我们已经将DPD_F与两种现有的设计模式检测技术进行了比较,即功能图和Marple-DPD。经验结果表明,我们的方法在精度方面的表现分别超过了最先进的方法约35%和15%。运行时性能还支持分类器的实际适用性。

Software design patterns are standard solutions to common problems in software design and architecture. Knowing that a particular module implements a design pattern is a shortcut to design comprehension. Manually detecting design patterns is a time consuming and challenging task, therefore, researchers have proposed automatic design pattern detection techniques. However, these techniques show low performance for certain design patterns. In this work, we introduce a design pattern detection approach, DPD_F that improves the performance over the state-of-the-art by using code features with machine learning classifiers to automatically train a design pattern detector. DPD_F creates a semantic representation of Java source code using the code features and the call graph, and applies the \textit{Word2Vec} algorithm on the semantic representation to construct the word-space geometric model of the Java source code. DPD$_F$ then builds a Machine Learning classifier trained on a labelled dataset and identifies software design patterns with over 80% Precision and over 79\% Recall. Additionally, we have compared DPD_F with two existing design pattern detection techniques namely FeatureMaps & MARPLE-DPD. Empirical results demonstrate that our approach outperforms the state-of-the-art approaches by approximately 35% and 15% respectively in terms of Precision. The run-time performance also supports the practical applicability of our classifier.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源