Software defect prediction is becoming key for software quality assurance. Traditional software defect prediction approaches have predominantly focused on analyzing code-level metrics, often overlooking valuable information available during the requirements phase. However, when a requirement change request (RCR) is issued, usually during the maintenance and evolution phase, predicting software defects provides an important preventative measure. Work in requirement-based software defect prediction methods typically focus on identifying requirement flaws, such as ambiguity or incompleteness, and fail to adequately predict defects that may manifest later in the operational software system. This paper proposes a context-driven representation model, named FORESIGHT, that predicts software defect types from requirements change requests using machine learning methods. The proposed model uses binary indicators to represent contextual metrics derived from change-request characteristics and supports multi-class prediction from both primary defect types and defect manifestation types. To build its representation model, three datasets were created from real-world industrial projects in different software domains (Web, Mobile, and ASRS). FORESIGHT was evaluated using Random Forest, XGBoost, and Gradient Boosting classifiers. Results show certain software defect types can be reliability predicted with Random Forest achieving the highest macro-F1 (0.815–0.873 for primary defect type prediction; 0.683–0.833 for defect manifestation prediction) across all three datasets, outperforming XGBoost and Gradient Boosting on every dataset–task combination. Findings show that contextual metrics from requirements change requests, structured within the FORESIGHT representation model, enable reliable pre-implementation prediction of specific defect types in deployed software systems.
Helwa et al. (2026) studied this question.