1
|
|
package com.shma; |
2
|
|
|
3
|
|
public class FizzBuzz { |
4
|
|
public String getResult(int number) { |
5
|
2
1. getResult : Replaced integer modulus with multiplication → KILLED
2. getResult : negated conditional → KILLED
|
if (number % 15 == 0) { |
6
|
1
1. getResult : replaced return value with "" for com/shma/FizzBuzz::getResult → KILLED
|
return "FizzBuzz"; |
7
|
2
1. getResult : Replaced integer modulus with multiplication → KILLED
2. getResult : negated conditional → KILLED
|
} else if (number % 3 == 0) { |
8
|
1
1. getResult : replaced return value with "" for com/shma/FizzBuzz::getResult → KILLED
|
return "Fizz"; |
9
|
2
1. getResult : Replaced integer modulus with multiplication → KILLED
2. getResult : negated conditional → KILLED
|
} else if (number % 5 == 0) { |
10
|
1
1. getResult : replaced return value with "" for com/shma/FizzBuzz::getResult → KILLED
|
return "Buzz"; |
11
|
|
} |
12
|
1
1. getResult : replaced return value with "" for com/shma/FizzBuzz::getResult → KILLED
|
return Integer.toString(number); |
13
|
|
} |
14
|
|
} |
| | Mutations |
5 |
|
1.1 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_buzz_if_the_number_is_dividable_by_15(com.shma.FizzBuzzTest) Replaced integer modulus with multiplication → KILLED 2.2 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_buzz_if_the_number_is_dividable_by_5(com.shma.FizzBuzzTest) negated conditional → KILLED
|
6 |
|
1.1 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_buzz_if_the_number_is_dividable_by_15(com.shma.FizzBuzzTest) replaced return value with "" for com/shma/FizzBuzz::getResult → KILLED
|
7 |
|
1.1 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_buzz_if_the_number_is_dividable_by_3(com.shma.FizzBuzzTest) Replaced integer modulus with multiplication → KILLED 2.2 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_buzz_if_the_number_is_dividable_by_5(com.shma.FizzBuzzTest) negated conditional → KILLED
|
8 |
|
1.1 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_buzz_if_the_number_is_dividable_by_3(com.shma.FizzBuzzTest) replaced return value with "" for com/shma/FizzBuzz::getResult → KILLED
|
9 |
|
1.1 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_buzz_if_the_number_is_dividable_by_5(com.shma.FizzBuzzTest) Replaced integer modulus with multiplication → KILLED 2.2 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_buzz_if_the_number_is_dividable_by_5(com.shma.FizzBuzzTest) negated conditional → KILLED
|
10 |
|
1.1 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_buzz_if_the_number_is_dividable_by_5(com.shma.FizzBuzzTest) replaced return value with "" for com/shma/FizzBuzz::getResult → KILLED
|
12 |
|
1.1 Location : getResult Killed by : com.shma.FizzBuzzTest.should_return_the_same_number_if_no_other_requirement_is_fulfilled(com.shma.FizzBuzzTest) replaced return value with "" for com/shma/FizzBuzz::getResult → KILLED
|