Mining Patterns in Source Code Using Tree Mining Algorithms

Pham, Hoang Son;Nijssen, Siegfried;Mens, Kim;et.al.
(2019) DS2019- 22nd International Conference on Discovery Science — Location: Split, Croatia (28.October.2019)

Files

main.pdf
  • Open Access
  • Adobe PDF
  • 334.28 KB

Details

Authors
Abstract
Discovering regularities in source code is of great interest to software engineers, both in academia and in industry, as regularities can provide useful information to help in a variety of tasks such as code comprehension, code refactoring, and fault localisation. However, traditional pattern mining algorithms often find too many patterns of little use and hence are not suitable for discovering useful regularities. In this paper we propose FREQTALS, a new algorithm for mining patterns in source code based on the FREQT tree mining algorithm. First, we introduce several constraints that effectively enable us to find more useful patterns; then, we show how to efficiently include them in FREQT. To illustrate the usefulness of the constraints we carried out a case study in collaboration with software engineers, where we identified a number of interesting patterns in a repository of Java code.
Affiliations

Citations

Pham, H. S., Nijssen, S., Mens, K., & et al. (2019). Mining Patterns in Source Code Using Tree Mining Algorithms. Lecture Notes in Computer Science, 11828(11828), 471-480. https://doi.org/10.1007/978-3-030-33778-0_35 (Original work published 2019)