🤖 AI Summary
This study addresses the challenge of identifying minor defects during early software development stages, where labeled data are scarce. We present the first systematic evaluation of Quantum Support Vector Classifiers (QSVC/PQSVC) for defect prediction on real-world open-source projects. Leveraging 30,924 commit records across 14 projects, we propose a subset-aggregation framework for QSVC-based defect prediction and an incremental testing mechanism: (i) subset partitioning with weighted voting enhances prediction consistency; (ii) an incremental feature-mapping strategy mitigates mapping failures induced by quantum hardware resource constraints. Experimental results demonstrate that QSVC/PQSVC achieve accuracy comparable to—and in some cases exceeding—that of classical SVC, validating the feasibility and practical potential of quantum SVMs in STAF (Software Testing at Early-stage and with Few labels) scenarios.
📝 Abstract
Purpose: Quantum computing promises to transform problem-solving across various domains with rapid and practical solutions. Within Software Evolution and Maintenance, Quantum Machine Learning (QML) remains mostly an underexplored domain, particularly in addressing challenges such as detecting buggy software commits from code repositories. Methods: In this study, we investigate the practical application of Quantum Support Vector Classifiers (QSVC) for detecting buggy software commits across 14 open-source software projects with diverse dataset sizes encompassing 30,924 data instances. We compare the QML algorithm PQSVC (Pegasos QSVC) and QSVC against the classical Support Vector Classifier (SVC). Our technique addresses large datasets in QSVC algorithms by dividing them into smaller subsets. We propose and evaluate an aggregation method to combine predictions from these models to detect the entire test dataset. We also introduce an incremental testing methodology to overcome the difficulties of quantum feature mapping during the testing approach. Results: The study shows the effectiveness of QSVC and PQSVC in detecting buggy software commits. The aggregation technique successfully combines predictions from smaller data subsets, enhancing the overall detection accuracy for the entire test dataset. The incremental testing methodology effectively manages the challenges associated with quantum feature mapping during the testing process. Conclusion: We contribute to the advancement of QML algorithms in defect prediction, unveiling the potential for further research in this domain. The specific scenario of the Short-Term Activity Frame (STAF) highlights the early detection of buggy software commits during the initial developmental phases of software systems, particularly when dataset sizes remain insufficient to train machine learning models.