Skip to main content
QUICK REVIEW

[Paper Review] Does chronology matter in JIT defect prediction? A Partial Replication Study

Hadi Jahanshahi, Dhanya Jothimani|arXiv (Cornell University)|Mar 5, 2021
Software Engineering ResearchComputer Science27 references5 citations
TL;DR

This study investigates whether the chronological order of code change data affects Just-In-Time (JIT) defect prediction models. Using five families of code change properties (size, diffusion, history, experience, purpose) and Random Forest models on four open-source projects, it finds that model predictive power remains stable over time, but property importance fluctuates. The key contribution is a weighted sampling approach that improves model calibration by prioritizing recent data, enhancing performance without sacrificing historical data breadth.

ABSTRACT

Just-In-Time (JIT) models detect the fix-inducing changes (or defect-inducing changes). These models are designed based on the assumption that past code change properties are similar to future ones. However, as the system evolves, the expertise of developers and/or the complexity of the system also changes. In this work, we aim to investigate the effect of code change properties on JIT models over time. We also study the impact of using recent data as well as all available data on the performance of JIT models. Further, we analyze the effect of weighted sampling on the performance of fix-inducing properties of JIT models. For this purpose, we used datasets from Eclipse JDT, Mozilla, Eclipse Platform, and PostgreSQL. We used five families of change-code properties such as size, diffusion, history, experience, and purpose. We used Random Forest to train and test the JIT model and Brier Score and the area under the ROC curve for performance measurement. Our paper suggests that the predictive power of JIT models does not change over time. Furthermore, we observed that the chronology of data in JIT defect prediction models can be discarded by considering all the available data. On the other hand, the importance score of families of code change properties is found to oscillate over time. To mitigate the impact of the evolution of code change properties, it is recommended to use a weighted sampling approach in which more emphasis is placed upon the changes occurring closer to the current time. Moreover, since properties such as "Expertise of the Developer" and "Size" evolve with time, the models obtained from old data may exhibit different characteristics compared to those employing the newer dataset. Hence, practitioners should constantly retrain JIT models to include fresh data.

Motivation & Objective

  • To validate and extend the findings of McIntosh and Kamei (2020) on JIT defect prediction using a partial replication approach.
  • To investigate whether the predictive power of JIT models degrades over time as software systems evolve.
  • To analyze how the importance of code change properties (e.g., size, developer expertise) evolves with time and system aging.
  • To evaluate the impact of using all historical data versus only recent data on model performance.
  • To propose and evaluate a weighted sampling strategy that prioritizes recent changes to improve model calibration and discriminatory power.

Proposed method

  • Replicated the original JIT defect prediction study using datasets from four open-source projects: Eclipse JDT, Mozilla, Eclipse Platform, and PostgreSQL.
  • Extracted five families of code change properties: size, diffusion, history, experience, and purpose from version control and issue tracking data.
  • Trained and evaluated Random Forest models using Brier Score (BS) and Area Under Curve (AUC) as performance metrics.
  • Applied the Wilcoxon Signed Rank Test to statistically compare model performance between training on all available data versus recent data subsets.
  • Proposed and evaluated a weighted sampling strategy that assigns higher weights to more recent changes to reflect evolving code properties.
  • Used the SZZ algorithm to identify fix-inducing changes, with caution regarding its known limitations in commit-bug mapping.

Experimental results

Research questions

  • RQ1RQ1: Does the predictive power of JIT models degrade over time as software systems evolve?
  • RQ2RQ2: Does the relationship between code change properties and fix-induction likelihood evolve over time?
  • RQ3RQ3: Can the performance of JIT models be improved by considering the chronology of data through weighted sampling strategies?

Key findings

  • The predictive power of JIT models remains stable over time, indicating that models trained on historical data do not significantly lose accuracy as time progresses.
  • The importance scores of code change property families (e.g., size, expertise) fluctuate over time, suggesting that the relevance of certain features evolves with system aging.
  • Using only recent data (e.g., last six months) leads to better model calibration and discriminatory power compared to using all historical data, despite similar AUC scores.
  • The proposed weighted sampling approach improves Brier Score (BS), indicating better calibration, by emphasizing recent changes while retaining the benefits of large-scale training data.
  • Models trained on all available data may misrepresent current feature dependencies due to outdated property correlations, especially for dynamic properties like developer expertise and code size.
  • The results suggest that practitioners should retrain JIT models periodically using recent data to maintain alignment with current development patterns and property dynamics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.