CS FundamentalsHardTCS · HCL · Tech Mahindra
A team measures defect density after release. Release 1: 30 defects in 15 KLOC. Release 2 adds 10 KLOC of new code and has 26 defects, all in the new code. Which statement is correct?
- A. Release 2 is better: 26 defects is fewer than 30
- B. Both releases have the same density of 2 defects per KLOC
- C. Release 2's new code is worse: 2.6 defects per KLOC against 2.0
- D. Release 2 is better: 1.04 defects per KLOC over 25 KLOC
Correct answer: C. Release 2's new code is worse: 2.6 defects per KLOC against 2.0
Release 1: 30/15 = 2.0 per KLOC. Release 2's defects all lie in 10 KLOC of new code: 26/10 = 2.6 per KLOC. Dividing by the whole 25 KLOC dilutes the measure with old, already-tested code.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- Activities (days; predecessors): P 5 (-), Q 6 (-), R 5 (P), S 5 (Q), T 4 (R, S). The manager can shorten only one activity by 2 days…
- Counting each simple condition separately (each 'and'/'or' adds one) and each loop header as one decision, what is the cyclomatic…
- For the function below, which single call executes every statement (100% statement coverage)? python def f(a, n): total = 0 for x in a: if…
- For the call f([3], 5) on the function below, what decision (branch) coverage is achieved, treating the for loop as a decision with two…
- The function below has cyclomatic complexity 3. What is the minimum number of test calls that achieves 100% branch coverage of it? python…
- A planar control-flow graph of a single function has 11 nodes and 14 edges. By the region method, McCabe's V(G) equals the number of…