IRJIT: A simple, online, information retrieval approach for just-in-time software defect prediction

Hareeme Sahar and Abdul Ali Bangash and Abram Hindle and Denilson Barbosa

2024/06/10

IRJIT: A simple, online, information retrieval approach for just-in-time software defect prediction

Authors

Hareeme Sahar and Abdul Ali Bangash and Abram Hindle and Denilson Barbosa

Venue

Abstract

Just-in-Time software defect prediction (JIT-SDP) prevents the introduction of defects into the software by identifying them at commit check-in time. Current software defect prediction approaches rely on manually crafted features such as change metrics and involve expensive to train machine learning or deep learning models. These models typically involve extensive training processes that may require significant computational resources and time. These characteristics can pose challenges when attempting to update the models in real-time as new examples become available, potentially impacting their suitability for fast online defect prediction. Furthermore, the reliance on a complex underlying model makes these approaches often less explainable, which means the developers cannot understand the reasons behind models’ predictions. An approach that is not explainable might not be adopted in real-life development environments because of developers’ lack of trust in its results. To address these limitations, we propose an approach called IRJIT that employs information retrieval on source code and labels new commits as buggy or clean based on their similarity to past buggy or clean commits. IRJIT approach is online and explainable as it can learn from new data without expensive retraining, and developers can see the documents that support a prediction, providing additional context. By evaluating 10 open-source datasets in a within project setting, we show that our approach is up to 112 times faster than the state-of-the-art ML and DL approaches, offers explainability at the commit and line level, and has comparable performance to the state-of-the-art.

Bibtex

@article{sahar2024emse-IRJIT,
 abstract = {Just-in-Time software defect prediction (JIT-SDP) prevents the introduction of defects into the software by identifying them at commit check-in time. Current software defect prediction approaches rely on manually crafted features such as change metrics and involve expensive to train machine learning or deep learning models. These models typically involve extensive training processes that may require significant computational resources and time. These characteristics can pose challenges when attempting to update the models in real-time as new examples become available, potentially impacting their suitability for fast online defect prediction. Furthermore, the reliance on a complex underlying model makes these approaches often less explainable, which means the developers cannot understand the reasons behind models’ predictions. An approach that is not explainable might not be adopted in real-life development environments because of developers’ lack of trust in its results. To address these limitations, we propose an approach called IRJIT that employs information retrieval on source code and labels new commits as buggy or clean based on their similarity to past buggy or clean commits. IRJIT approach is online and explainable as it can learn from new data without expensive retraining, and developers can see the documents that support a prediction, providing additional context. By evaluating 10 open-source datasets in a within project setting, we show that our approach is up to 112 times faster than the state-of-the-art ML and DL approaches, offers explainability at the commit and line level, and has comparable performance to the state-of-the-art.},
 accepted = {2024-06-10},
 author = {Hareeme Sahar and Abdul Ali Bangash and Abram Hindle and Denilson Barbosa},
 authors = {Hareeme Sahar and Abdul Ali Bangash and Abram Hindle and Denilson Barbosa},
 code = {sahar2024emse-IRJIT},
 day = {02},
 doi = {https://doi.org/10.1007/s10664-024-10514-z},
 funding = {NSERC Discovery, CIHR},
 institution = {University of Alberta},
 journal = {Empirical Software Engineering},
 month = {August},
 number = {131},
 pages = {1--38},
 payurl = {https://link.springer.com/article/10.1007/s10664-024-10514-z},
 role = { Researcher / Co-author},
 title = {IRJIT: A simple, online, information retrieval approach for just-in-time software defect prediction},
 type = {article},
 url = {http://softwareprocess.ca/pubs/sahar2024emse-IRJIT.pdf},
 venue = {Empirical Software Engineering},
 volume = {29},
 year = {2024}
}