In this paper we compare two approaches to discover recurrent fragments in source code: clone detection and frequent subtree mining. We apply both approaches to a medium-sized Java case and compare qualitatively and quantitatively their results in terms of what types of code fragments are detected, as well as their size, relevance, coverage, and level of detail. We conclude that both approaches are complementary, while existing overlap may be used for cross-validation of the approaches.
Deknop, C., Baars, S., Mens, K., Oprescu, A., & Fabry, J. (2019). Clone Detection vs. Pattern Mining: The Battle. C E U R Workshop Proceedings, Vol(2605), 14-21. https://hdl.handle.net/2078.5/123703 (Original work published 2019)