Anticipating Bugs: Ticket-Level Bug Prediction and Temporal Proximity Effects
收藏资源简介:
Context: Software bugs significantly impact project time, budgets, and safety, motivating extensive research in bug prediction. The primary goal of bug prediction is to optimize testing efforts by focusing on software fragments, i.e., classes, methods, commits (JIT), or lines of code, most likely to be buggy. However, these predicted fragments already contain bugs. Thus, the current bug prediction approaches support fixing rather than prevention. Aim: Motivated by the principle of "prevention is better than cure," the aim of this paper is to introduce and evaluate Ticket-Level Prediction (TLP), an approach to identify tickets that will introduce bugs once implemented. We analyze TLP at three temporal points, each point represents a ticket lifecycle stage: Open, In Progress, or Closed. We conjecture that: (1) TLP accuracy increases as tickets progress towards the closed stage due to improved feature reliability over time, and (2) the predictive power of features changes across these temporal points. Our TLP approach leverages 72 features belonging to six different families: code, developer, external temperature, internal temperature, intrinsic, ticket to tickets, and JIT. Method: Our TLP evaluation uses a sliding-window aapproach, balancing, feature selection, and three machine-learning bug prediction classifiers on about 10,000 tickets of two Apache open-source projects. We assess TLP accuracy via standard metrics such as Precision, Recall, F1, AUC, Kappa and GMean. We evaluate the power of features via information gain ratio and feature selection. Results: Our results show that TLP accuracy increases with proximity, confirming the expected trade-off between early prediction and accuracy. Regarding the prediction power of feature families, our study shows that the power of feature families changes according to the feature family, the proximity, and their interaction. Consequently, no single feature family consistently dominates across all temporal proximity points. Thus, TLP should use features sets depending on the temporal proximity point. In particular, while JIT features are paramount at Closed, other features families are more important than JIT at Open and In Progress. Conclusions: Our findings complements and extends the literature on bug prediction at class, method or commit level by showing that defect prediction can be effectively moved upstream, offering opportunities for risk-aware ticket triaging and developer assignment before any code is written.



