CT-AI practice question 4 of 15

Which ONE of the following models BEST describes a way to model defect prediction by looking at the history of bugs in modules by using code quality metrics of modules of historical versions as input? SELECT ONE OPTION

Full set: 120 questions
Answer options
A: Identifying the relationship between developers and the modules developed by them.
B: Search of similar code based on natural language processing.
C: Clustering of similar code modules to predict based on similarity.
D: Using a classification model to predict the presence of a defect by using code quality metrics as the input data. Correct answer
Correct Answer:
D. Using a classification model to predict the presence of a defect by using code quality metrics as the input data.
Explanation

Defect prediction is a classic application of supervised machine learning. The goal is to predict a binary outcome (defect or no defect) for a given code module. This is a classification task. The features, or input data, used for this prediction are code quality metrics (e.g., cyclomatic complexity, lines of code, code churn) from historical versions. The model learns the relationship between these metrics and the presence of bugs from past data. Therefore, using a classification model with code quality metrics as input is the most accurate description of this process.

Why Incorrect

A. This describes a social network analysis of code contributions, which is a different approach and not the primary method described in the question.
B. This describes a code similarity or code search task using NLP, which is not directly about predicting defects based on quality metrics.
C. Clustering is an unsupervised learning technique used for grouping similar items; it does not inherently predict a specific outcome like the presence of a defect.

References

1. ISTQB

"ISTQB Certified Tester AI Testing (CT-AI) Syllabus

" Version 1.0

2021. Section 4.3.2

"AI in Software Testing

" mentions using AI for defect prediction based on historical data.

2. Hall

T.

Beecham

S.

Bowes

D.

Gray

D.

& Counsell

S. (2012). A Systematic Literature Review on Fault Prediction Performance in Software Engineering. IEEE Transactions on Software Engineering

38(6)

1276-1304. (Discusses using code metrics as inputs for classification models for defect prediction). DOI: 10.1109/TSE.2011.103.

Scroll to Top