arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1903.01899cs.SEcs.LG
收藏

一种基于机器学习的包围盒反模式检测方法

A Machine-learning Based Ensemble Method For Anti-patterns Detection

Polytechnique Montreal(蒙特利尔综合理工学院);Concordia University(康考迪亚大学)

Antoine Barbez, Foutse Khomh, Yann-Gaël Guéhéneuc

摘要:

反模式对于反复出现的设计问题来说是一个糟糕的解决方案。一些实证研究已经强调了它们对程序理解、可维护性以及错误倾向的负面影响。已经提出了各种检测方法来识别它们在源代码中的出现。然而,这些方法只能识别事件的一个子集,并报告大量的误报和漏报。此外,不同方法之间的一致性普遍较低。最近的研究表明,机器学习模型有可能改善这种情况。然而,这样的算法需要大量的人工生成的训练数据,这往往限制了它们在实践中的应用。在本文中,我们提出了SMAD(反模式检测器的智能聚合),一个基于机器学习集成方法来聚合各种反模式检测方法的内部检测规则的基础上。因此,我们的方法使用几个检测工具,从合理数量的训练样本中产生改进的预测。我们实现了SMAD来检测两个著名的反模式:God Class和Feature Envy。我们的实验结果进行了八个Java项目,我们表明:(1)我们的方法明显提高了聚合工具;(2)SMAD显着优于其他集成方法。

英文摘要:

Anti-patterns are poor solutions to recurring design problems. Several empirical studies have highlighted their negative impact on program comprehension, maintainability, as well as fault-proneness. A variety of detection approaches have been proposed to identify their occurrences in source code. However, these approaches can identify only a subset of the occurrences and report large numbers of false positives and misses. Furthermore, a low agreement is generally observed among different approaches. Recent studies have shown the potential of machine-learning models to improve this situation. However, such algorithms require large sets of manually-produced training-data, which often limits their application in practice. In this paper, we present SMAD (SMart Aggregation of Anti-patterns Detectors), a machine-learning based ensemble method to aggregate various anti-patterns detection approaches on the basis of their internal detection rules. Thus, our method uses several detection tools to produce an improved prediction from a reasonable number of training examples. We implemented SMAD for the detection of two well known anti-patterns: God Class and Feature Envy. With the results of our experiments conducted on eight java projects, we show that: (1) our method clearly improves the so aggregated tools; (2) SMAD significantly outperforms other ensemble methods.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑