Defect prediction has been a popular research topic where machine learning (ML) and deep learning (DL) have found numerous applications. However, these ML/DL-based defect prediction models are often limited by the quality and size of their datasets. In this paper, we present Defectors, a large dataset for just-in-time and line-level defect prediction. Defectors consists of $\approx$ 213K source code files ($\approx$ 93K defective and $\approx$ 120K defect-free) that span across 24 popular Python projects. These projects come from 18 different domains, including machine learning, automation, and internet-of-things. Such a scale and diversity make Defectors a suitable dataset for training ML/DL models, especially transformer models that require large and diverse datasets. We also foresee several application areas of our dataset including defect prediction and defect explanation. Dataset link: https://doi.org/10.5281/zenodo.7708984
翻译:缺陷预测一直是机器学习与深度学习广泛应用的热门研究课题。然而,基于机器学习/深度学习的缺陷预测模型常常受限于数据集的质量与规模。本文提出了Defectors——一个用于即时缺陷预测和行级缺陷预测的大规模数据集。该数据集包含约21.3万个源代码文件(约9.3万个缺陷文件与约12万个无缺陷文件),涵盖24个主流Python项目。这些项目来自18个不同领域,包括机器学习、自动化和物联网。如此规模与多样性使Defectors成为训练机器学习/深度学习模型的理想数据集,尤其适用于需要大规模多样化数据的Transformer模型。我们还预见了该数据集在缺陷预测与缺陷解释等多个应用领域的潜力。数据集链接:https://doi.org/10.5281/zenodo.7708984