You didn't include a definition for reachability, infection, and propagation in your question -- I am assuming the following:
- reachability: execution of the mutated expression
- infection: the value of the mutated expression differs from the value of the original (unmutated) expression
- propagation: the infected state (different expression value) leads to infection of an observable state
Also note that (d) not only depends on the input but also on the test oracle -- achieving propagation does not imply killing the mutant.
The following inputs satisfy your requirements:
(a) There exists no such input; the loop initializer int i = 0
is executed for every input, even if numbers
is null and consequently numbers.length
raises a NullPointerException. Note that only a test that does not call the findVal
method can't reach the mutant -- calling findVal
implies satisfying reachability for this mutant.
(b) There exists no such input; the mutated expression is independent of the method parameters (i=0
!= i=1
for any input) -- satisfying reachability implies satisfying infection for this mutant.
(c) numbers
is an empty array; if numbers.length
is 0, then the initial value of i
(for any i
>=0) doesn't matter, even though the state of i
is infected. Passing in null for numbers
is another example that satisfies infection but not propagation.
(d) numbers
is a one-element array, whose element value equals val
. There are many inputs that satisfy propagation, which means that the mutant can be killed -- whether the test actually kills the mutant depends on whether the test asserts on the outcome.