Feature Engineering for Software Defect Prediction Models
Keywords:
software defect prediction, feature engineering, static code metrics, process metrics, code embeddings, class imbalance, feature selection, concept driftAbstract
Software defect prediction (SDP) remains a cornerstone of quality assurance in large-scale software engineering, where even marginal improvements in recall at low inspection budgets translate to substantial savings. While model choice often receives outsized attention, the decisive factor in robust SDP performance is feature engineering: how we represent source code, process signals, developer activity, and temporal dynamics. This manuscript presents a comprehensive, practical blueprint for feature engineering tailored to defect prediction. We consolidate static code metrics, process and change metrics, semantic representations learned from code and text, social/ownership signals, and temporally aware features into an auditable pipeline.
We discuss leakage-safe preprocessing, class imbalance remedies, and feature selection strategies (filter, wrapper, and embedded) that preserve stability across versions and projects. A simulation study, using a realistic protocol with time-based splits and cross-project transfer, demonstrates that a well-engineered feature set can improve area under the precision–recall curve (AUC-PR) by 11–18% and top-20% cost-effectiveness by 9–15% compared to off‑the‑shelf metrics alone. Statistical analysis (Friedman/Nemenyi over ten versions) indicates significant gains for models using combined semantic–process features. The results generalize across tree ensembles and linear baselines, underscoring that careful feature work—not necessarily deeper models—drives dependable defect prediction performance.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 The journal retains copyright of all published articles, ensuring that authors have control over their work while allowing wide dissenmination.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Articles are published under the Creative Commons Attribution NonCommercial 4.0 License (CC BY NC 4.0), allowing others to distribute, remix, adapt, and build upon the work for non-commercial purposes while crediting the original author.






