1 | package com.frk; | |
2 | ||
3 | /** | |
4 | * @date 2024/3/19 | |
5 | */ | |
6 | public class IntNumber { | |
7 | private int a; | |
8 | private int b; | |
9 | ||
10 | public IntNumber(int a, int b) { | |
11 | this.a = a; | |
12 | this.b = b; | |
13 | } | |
14 | ||
15 | public int add () { | |
16 |
1
1. add : negated conditional → KILLED |
if (a == 1) |
17 |
2
1. add : replaced int return with 0 for com/frk/IntNumber::add → KILLED 2. add : Replaced integer addition with subtraction → KILLED |
return a + b; |
18 |
1
1. add : negated conditional → KILLED |
else if(a == 0) |
19 | return 0; | |
20 |
1
1. add : replaced int return with 0 for com/frk/IntNumber::add → NO_COVERAGE |
return -1; |
21 | } | |
22 | } | |
Mutations | ||
16 |
1.1 |
|
17 |
1.1 2.2 |
|
18 |
1.1 |
|
20 |
1.1 |