Mitigating The Quality Risk of Drifts: An Empirical Comparison of Ai-Predictive Clock Explanation Model (cem) Against Shap, Lime Methods
Ensuring software quality requires an understanding of how software changes over time. However, time-dependent elements such as code complexity growth and code churn are frequently overlooked by conventional quality evaluation and interpretability techniques. Therefore, we gain some insight into the reasons behind quality drift. In this research, we introduce the Clock Explanation Method (CEM), a novel interpretability paradigm for analyzing and explaining software time-dependent changes that impact software quality. Specifically focusing on critical variations in bug count, code churn, lines of code (LOC), average complexity, and test coverage metrics. We compare our method with model-based explanation methods such as (SHapley Additive exPlanations (SHAP) and Local Interpretable Model-agnostic Explanations (LIME). In order to detect quality drifts, CEM analyzes temporal changes of the key metrics by identifying significant deviations that indicate potential quality issues. We evaluated these methods by applying them to the Apache Commons-Lang project through five-fold cross-validation, analyzing both the drift points they detect and the explanations they provide. Our results show that CEM achieves perfect precision (1.00) compared to SHAP and LIME (both 0.92), while all methods demonstrate relatively low recall. In terms of overall accuracy, CEM achieves 0.185 in cross-validation, outperforming SHAP and LIME, which both achieve 0.168. Interestingly, CEM detects 28 drift points while SHAP and LIME both identify the same set of 25 points, with minimal overlap between these sets, suggesting that different detection methods capture distinct aspects of software quality changes.
