TraceJIT: Evaluating the Impact of Behavioral Code Change on JIT Defect Prediction

Authors - Issei Morita, Yutaro Kashiwa, Masanari Kondo, Jeongju Sohn, Shane McIntosh, Yasutaka Kamei, Naoyasu Ubayashi
Venue - International Conference on Software Analysis, Evolution, and Reengineering, pp. To appear, 2024

Related Tags - SANER 2024 software quality defect prediction

Abstract - Just-In-Time (JIT) defect prediction strives to model changes that induce future fixes so that they can be predicted or better understood to inform development practices. Prior work demonstrates that the majority of the predictive/explanatory power of JIT models derives from the size of a change (i.e., larger changes tend to be defect-prone); however, in practice, a misguided change to even a single line of code can lead to defects. While it is clearly the case that larger changes are more likely to alter the product behavior, even small changes are capable of doing this, and when they do, they pose a risk that teams should note. However, to the best of our knowledge, JIT defect prediction models are yet to incorporate features that characterize the change in product behavior when modelling risk.

This paper is the first to explore the impact of behavioral code change on JIT prediction. Specifically, we propose seven dynamic features that capture the difference in product behavior before and after applying a change. These features are computed using trace logs that are collected during invocations of test suites. Using these logs, we identify which lines of code started/stopped being exercised after a change. We evaluate these features by conducting an empirical study of two large and thriving open- source projects. We observe that, compared to baseline models that use traditional features, adding our proposed set of behavior features leads to improvements of up to 5.9% of ROC-AUC, 44.8% of precision, and 14.1% of PR-AUC. This paper not only demonstrates the importance of behavioral features for JIT defect prediction, but also lays the foundation for future work on behavioral features in other software engineering contexts, such as build outcome prediction and code reviewer recommendation.

Preprint - PDF

Bibtex

@inproceedings{morita2024saner,
  Author = {Issei Morita and Yutaro Kashiwa and Masanari Kondo and Jeongju Sohn and Shane McIntosh and Yasutaka Kamei and Naoyasu Ubayashi},
  Title = {{TraceJIT: Evaluating the Impact of Behavioral Code Change on JIT Defect Prediction}},
  Year = {2024},
  Booktitle = {Proc. of the International Conference on Software Analysis, Evolution, and Reengineering (SANER)},
  Pages = {To appear}
}