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 patterns detection techniques to facilitate software developers. However, these techniques show low performance for certain design patterns. In this work, we introduce an approach that improves the performance over the state-of-the-art by using code features with machine learning classifiers to automatically train a design pattern detection. We create a semantic representation of source code from the code features and the call graph, and apply the Word2Vec algorithm on the semantic representation to construct the word-space geometric model of the Java source code. DPD_F then uses a Machine Learning approach trained using the word-space model and identifies software design patterns with 74% Precision and 71% Recall. Additionally, we have compared our results with two existing design pattern detection approaches namely FeatureMaps & MARPLE-DPD. Empirical results demonstrate that our approach outperforms the benchmark approaches by 30\% and 10\% respectively in terms of Precision. The runtime performance also supports its practical applicability.


翻译:软件设计模式是软件设计和架构中常见问题的标准解决方案。 知道某个模块使用设计模式是设计理解的捷径。 人工检测设计模式是一项耗时且具有挑战性的任务; 因此, 研究人员提议了自动设计模式检测技术, 以便利软件开发者。 然而, 这些技术显示某些设计模式的性能较低。 在这项工作中, 我们引入了一种方法, 通过使用机器学习分类器的代码特性来提高最新设计模式的性能, 从而自动培训设计模式检测。 我们从代码特征和调用图中创建了源代码的语义表达法, 并在语义表达法上应用了 Word2Vec 算法来构建 Java 源代码的词空间几何模型。 DPD_F 然后使用一种经过培训的机器学习方法, 并用74% 的精度和 71%的回调来识别软件设计模式模式的性能。 此外, 我们将我们的结果与两种现有的设计模式检测方法进行了比较, 即, 自然地马斯和MARPLE- DPD。 Epricalalalal 显示我们的方法在实际操作上分别支持了30 和10 的可适用性。

0
下载
关闭预览

相关内容

设计模式(Design Pattern)是一套被反复使用、多数人知晓的、经过分类的、代码设计经验的总结。
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
商业数据分析,39页ppt
专知会员服务
157+阅读 · 2020年6月2日
【ICLR2020-】基于记忆的图网络,MEMORY-BASED GRAPH NETWORKS
专知会员服务
108+阅读 · 2020年2月22日
【深度学习视频分析/多模态学习资源大列表】
专知会员服务
91+阅读 · 2019年10月16日
机器学习相关资源(框架、库、软件)大列表
专知会员服务
38+阅读 · 2019年10月9日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
99+阅读 · 2019年10月9日
异常检测(Anomaly Detection)综述
极市平台
19+阅读 · 2020年10月24日
已删除
将门创投
7+阅读 · 2020年3月13日
人脸相关算法、数据集、文献资源大列表
专知
16+阅读 · 2019年3月16日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
ResNet, AlexNet, VGG, Inception:各种卷积网络架构的理解
全球人工智能
19+阅读 · 2017年12月17日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
【论文】图上的表示学习综述
机器学习研究会
12+阅读 · 2017年9月24日
Learning Memory-guided Normality for Anomaly Detection
Arxiv
7+阅读 · 2018年12月5日
q-Space Novelty Detection with Variational Autoencoders
Zero-Shot Object Detection
Arxiv
9+阅读 · 2018年7月27日
Arxiv
11+阅读 · 2018年4月8日
Arxiv
6+阅读 · 2018年2月6日
VIP会员
相关资讯
异常检测(Anomaly Detection)综述
极市平台
19+阅读 · 2020年10月24日
已删除
将门创投
7+阅读 · 2020年3月13日
人脸相关算法、数据集、文献资源大列表
专知
16+阅读 · 2019年3月16日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
ResNet, AlexNet, VGG, Inception:各种卷积网络架构的理解
全球人工智能
19+阅读 · 2017年12月17日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
【论文】图上的表示学习综述
机器学习研究会
12+阅读 · 2017年9月24日
Top
微信扫码咨询专知VIP会员