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

**Authors:** Antoine Barbez, Foutse Khomh, Yann-Ga\"el Gu\'eh\'eneuc

arXiv: 1903.01899 · 2019-10-18

## TL;DR

This paper introduces SMAD, an ensemble machine-learning method that combines various anti-pattern detection tools to improve accuracy and reduce false positives in identifying design anti-patterns in source code.

## Contribution

The paper presents SMAD, a novel ensemble approach that leverages multiple detection tools and internal rules to enhance anti-pattern detection accuracy with fewer training data.

## Key findings

- SMAD improves detection accuracy over individual tools.
- SMAD outperforms other ensemble methods.
- Effective detection of God Class and Feature Envy in Java projects.

## Abstract

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.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1903.01899/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/1903.01899/full.md

## References

45 references — full list in the complete paper: https://tomesphere.com/paper/1903.01899/full.md

---
Source: https://tomesphere.com/paper/1903.01899