Explainable Software Defect Prediction using Word Embeddings and Deep Learning

dc.contributor.authorPhoshoko, Ernest
dc.contributor.supervisorCelik, Turgay
dc.date.accessioned2026-08-18T13:36:47Z
dc.date.issued2025-10
dc.departmentInformation Engineering
dc.descriptionA dissertation submitted in fulfilment of the requirements for the degree of Master of Science in Engineering, to the Faculty of Engineering and the Built Environment, School of Electrical and Information Engineering, University of the Witwatersrand, Johannesburg, 2025
dc.description.abstractDefects in the source code discovered during or after deployments require resources and effort to resolve. Researchers have developed techniques to tackle the issue of detecting source code defects at an earlier stage. In this study, we examined several convolutional neural network architectures to build a bug detection classifier for Java source code. We utilized Word2Vec, GloVe, and FastText to train embedding models that assist in embedding Java source code in a suitable format for our trained networks. We also explored a few explainable AI methods to provide visual heatmap explanations of the decisions made by our neural networks. With all our models trained under the same conditions and for up to 300 epochs, we identified two top-performing models: ResNet18, with an average accuracy of 77.22%, average precision of 79.17%, average recall of 76.50%, and average F1 score of 77.39% across all embeddings; and MobileNet, with an average accuracy of 84.59%, average precision of 86.04% average recall of 83.69%, and average F1 score of 84.84%. In this study, we used saliency maps, Grad-CAM, Score-CAM, and FIMF score-CAM to generate and analyze heatmaps of Java source code methods, allowing us to analyze and compare the features that the models focus on when making predictions.
dc.description.submitterMMM2026
dc.facultyFaculty of Engineering and the Built Environment
dc.identifier0009-0002-9383-3409
dc.identifier.citationPhoshoko, Ernest. (2025). Explainable Software Defect Prediction using Word Embeddings and Deep Learning. [Master's dissertation, University of the Witwatersrand, Johannesburg]. WIReDSpace. https://hdl.handle.net/10539/49862
dc.identifier.urihttps://hdl.handle.net/10539/49862
dc.language.isoen
dc.publisherUniversity of the Witwatersrand, Johannesburg
dc.rights©2025 University of the Witwatersrand, Johannesburg. All rights reserved. The copyright in this work vests in the University of the Witwatersrand, Johannesburg. No part of this work may be reproduced or transmitted in any form or by any means, without the prior written permission of University of the Witwatersrand, Johannesburg.
dc.rights.holderUniversity of the Witwatersrand, Johannesburg
dc.schoolSchool of Electrical and Information Engineering
dc.subjectSource code
dc.subjectJava source code
dc.subjectWord2Vec
dc.subjectGloVe
dc.subjectFastText
dc.subjectMobileNet
dc.subjectResNet18
dc.subjectSoftware Defect Prediction
dc.subjectUCTD
dc.subject.primarysdgSDG-9: Industry, innovation and infrastructure
dc.subject.secondarysdgSDG-4: Quality education
dc.titleExplainable Software Defect Prediction using Word Embeddings and Deep Learning
dc.typeDissertation

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Phoshoko_Prediction_2025.pdf
Size:
13.72 MB
Format:
Adobe Portable Document Format

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
2.43 KB
Format:
Item-specific license agreed upon to submission
Description: