TraceJIT: Evaluating the Impact of Behavioral Code Change on Just-In-Time Defect Prediction

Issei Morita, Yutaro Kashiwa, Masanari Kondo, Jeongju Sohn, Shane McIntosh, Yasutaka Kamei, Naoyasu Ubayashi

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

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-AVC, 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.

Original languageEnglish
Title of host publicationProceedings - 2024 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2024
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages580-591
Number of pages12
ISBN (Electronic)9798350330663
DOIs
StatePublished - 2024
Event31st IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2024 - Rovaniemi, Finland
Duration: 12 Mar 202415 Mar 2024

Publication series

NameProceedings - 2024 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2024

Conference

Conference31st IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2024
Country/TerritoryFinland
CityRovaniemi
Period12/03/2415/03/24

Keywords

  • dynamic features
  • JIT defect prediction

Fingerprint

Dive into the research topics of 'TraceJIT: Evaluating the Impact of Behavioral Code Change on Just-In-Time Defect Prediction'. Together they form a unique fingerprint.

Cite this