preprint · arXiv (Cornell University) · 2018
The Adverse Effects of Code Duplication in Machine Learning Models of\n Code
Cited by 1Open access
Abstract
The field of big code relies on mining large corpora of code to perform some\nlearning task. A significant threat to this approach has been recently\nidentified by Lopes et al. (2017) who found a large amount of near-duplicate\ncode on GitHub. However, the impact of code duplication has not been noticed by\nresearchers devising machine learning models for source code. In this work, we\nexplore the effects of code duplication on machine learning models showing that\nreported performance metrics are sometimes inflated by up to 100% when testing\non duplicated code corpora compared to the performance on de-duplicated corpora\nwhich more accurately represent how machine learning models of code are used by\nsoftware engineers. We present a duplication index for widely used datasets,\nlist best practices for collecting code corpora and evaluating machine learning\nmodels on them. Finally, we release tools to help the community avoid this\nproblem in future research.\n
Cite this paper
Allamanis, M. (2018). The Adverse Effects of Code Duplication in Machine Learning Models of\n Code. arXiv (Cornell University). https://doi.org/10.48550/arxiv.1812.06469
Allamanis, Miltiadis. “The Adverse Effects of Code Duplication in Machine Learning Models of\n Code.” arXiv (Cornell University), 2018, https://doi.org/10.48550/arxiv.1812.06469.
Allamanis, Miltiadis. 2018. “The Adverse Effects of Code Duplication in Machine Learning Models of\n Code.” arXiv (Cornell University). https://doi.org/10.48550/arxiv.1812.06469.
Allamanis, M. (2018) ‘The Adverse Effects of Code Duplication in Machine Learning Models of\n Code’, arXiv (Cornell University). Available at: https://doi.org/10.48550/arxiv.1812.06469.
@misc{allamanis2018adverse,
title = {{The Adverse Effects of Code Duplication in Machine Learning Models of\n Code}},
author = {Allamanis, Miltiadis},
journal = {arXiv (Cornell University)},
year = {2018},
doi = {10.48550/arxiv.1812.06469}
}Made from the index record. Check names, capitalisation and page numbers against the paper. Need another style? AI for Research has over 10,000.