IntChromosome.java

1
package net.bmahe.genetics4j.core.chromosomes;
2
3
import java.util.Arrays;
4
import java.util.Objects;
5
6
import org.apache.commons.lang3.Validate;
7
8
/**
9
 * A chromosome implementation that represents genetic information as an array of integer values.
10
 * 
11
 * <p>IntChromosome is widely used for discrete optimization problems where solutions can be encoded as sequences of
12
 * integer values within specified ranges. Each position in the array represents a gene, and the integer value at that
13
 * position represents the allele.
14
 * 
15
 * <p>This chromosome type is particularly suitable for:
16
 * <ul>
17
 * <li><strong>Combinatorial optimization</strong>: Problems with discrete decision variables</li>
18
 * <li><strong>Parameter optimization</strong>: Integer hyperparameters, configuration settings</li>
19
 * <li><strong>Permutation encoding</strong>: When combined with appropriate operators</li>
20
 * <li><strong>Resource allocation</strong>: Assignment and scheduling problems</li>
21
 * <li><strong>Graph problems</strong>: Node labeling, path encoding</li>
22
 * </ul>
23
 * 
24
 * <p>Key features:
25
 * <ul>
26
 * <li><strong>Bounded values</strong>: All integers are constrained to [minValue, maxValue]</li>
27
 * <li><strong>Fixed length</strong>: Chromosome size is determined at creation time</li>
28
 * <li><strong>Immutable</strong>: Values cannot be changed after construction</li>
29
 * <li><strong>Type-safe</strong>: Compile-time guarantees for integer operations</li>
30
 * </ul>
31
 * 
32
 * <p>The chromosome maintains bounds information which is used by genetic operators to ensure that crossover and
33
 * mutation operations produce valid offspring within the specified constraints.
34
 * 
35
 * @see Chromosome
36
 * @see net.bmahe.genetics4j.core.spec.chromosome.IntChromosomeSpec
37
 * @see net.bmahe.genetics4j.core.chromosomes.factory.IntChromosomeFactory
38
 */
39
public class IntChromosome implements Chromosome {
40
41
	private final int size;
42
	private final int minValue;
43
	private final int maxValue;
44
	private final int[] values;
45
46
	/**
47
	 * Creates a new integer chromosome with the specified parameters and values.
48
	 * 
49
	 * @param _size     the number of integer values in this chromosome
50
	 * @param _minValue the minimum allowed value for any integer in this chromosome
51
	 * @param _maxValue the maximum allowed value for any integer in this chromosome
52
	 * @param _values   the array of integer values for this chromosome
53
	 * @throws IllegalArgumentException if size is not positive, if minValue > maxValue, if values array is null, or if
54
	 *                                  the array length doesn't match the specified size
55
	 */
56
	public IntChromosome(final int _size, final int _minValue, final int _maxValue, final int[] _values) {
57
		Validate.isTrue(_size > 0);
58
		Validate.isTrue(_minValue <= _maxValue);
59
		Objects.requireNonNull(_values);
60
		Validate.isTrue(_size == _values.length, "Provided size does not match the size of the content");
61
62 1 1. <init> : Removed assignment to member variable size → KILLED
		this.size = _size;
63 1 1. <init> : Removed assignment to member variable minValue → KILLED
		this.minValue = _minValue;
64 1 1. <init> : Removed assignment to member variable maxValue → KILLED
		this.maxValue = _maxValue;
65 3 1. <init> : Removed assignment to member variable values → KILLED
2. <init> : replaced call to java/util/Arrays::copyOf with argument → KILLED
3. <init> : removed call to java/util/Arrays::copyOf → KILLED
		this.values = Arrays.copyOf(_values, _size);
66
	}
67
68
	@Override
69
	public int getNumAlleles() {
70 1 1. getNumAlleles : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getNumAlleles → KILLED
		return size;
71
	}
72
73
	/**
74
	 * Returns the integer value at the specified index.
75
	 * 
76
	 * @param index the index of the allele to retrieve (0-based)
77
	 * @return the integer value at the specified position
78
	 * @throws IllegalArgumentException if index is negative or greater than or equal to the chromosome size
79
	 */
80
	public int getAllele(final int index) {
81
		Validate.inclusiveBetween(0, size - 1, index);
82
83 1 1. getAllele : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getAllele → KILLED
		return values[index];
84
	}
85
86
	/**
87
	 * Returns the number of integer values in this chromosome.
88
	 * 
89
	 * @return the chromosome size
90
	 */
91
	public int getSize() {
92 1 1. getSize : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getSize → KILLED
		return size;
93
	}
94
95
	/**
96
	 * Returns the minimum allowed value for integers in this chromosome.
97
	 * 
98
	 * @return the minimum value constraint
99
	 */
100
	public int getMinValue() {
101 1 1. getMinValue : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getMinValue → KILLED
		return minValue;
102
	}
103
104
	/**
105
	 * Returns the maximum allowed value for integers in this chromosome.
106
	 * 
107
	 * @return the maximum value constraint
108
	 */
109
	public int getMaxValue() {
110 1 1. getMaxValue : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getMaxValue → KILLED
		return maxValue;
111
	}
112
113
	/**
114
	 * Returns a copy of the integer values in this chromosome.
115
	 * 
116
	 * <p>The returned array is a defensive copy; modifications to it will not affect this chromosome.
117
	 * 
118
	 * @return a copy of the integer values array
119
	 */
120
	public int[] getValues() {
121 1 1. getValues : replaced return value with null for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getValues → KILLED
		return values;
122
	}
123
124
	/**
125
	 * Calculates and returns the sum of all integer values in this chromosome.
126
	 *
127
	 * <p>This method performs arithmetic addition of all alleles in the chromosome. The result may overflow if the sum
128
	 * exceeds the range of a 32-bit integer.
129
	 *
130
	 * @return the sum of all integer values in this chromosome
131
	 */
132
	public int sum() {
133 1 1. sum : Substituted 0 with 1 → KILLED
		int sum = 0;
134 5 1. sum : negated conditional → KILLED
2. sum : Substituted 0 with 1 → KILLED
3. sum : removed conditional - replaced comparison check with true → KILLED
4. sum : changed conditional boundary → KILLED
5. sum : removed conditional - replaced comparison check with false → KILLED
		for (int i = 0; i < size; i++) {
135 1 1. sum : Replaced integer addition with subtraction → KILLED
			sum += values[i];
136
		}
137
138 1 1. sum : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::sum → KILLED
		return sum;
139
	}
140
141
	/**
142
	 * Counts and returns the number of non-zero integer values in this chromosome.
143
	 *
144
	 * <p>This method iterates through all alleles and counts those that are not equal to zero.
145
	 *
146
	 * @return the count of non-zero integer values in this chromosome (0 to chromosome size)
147
	 */
148
	public int countNonZeros() {
149 1 1. countNonZeros : Substituted 0 with 1 → KILLED
		int numNonZeros = 0;
150 5 1. countNonZeros : removed conditional - replaced comparison check with false → KILLED
2. countNonZeros : removed conditional - replaced comparison check with true → KILLED
3. countNonZeros : changed conditional boundary → KILLED
4. countNonZeros : negated conditional → KILLED
5. countNonZeros : Substituted 0 with 1 → KILLED
		for (int i = 0; i < size; i++) {
151 3 1. countNonZeros : negated conditional → KILLED
2. countNonZeros : removed conditional - replaced equality check with true → KILLED
3. countNonZeros : removed conditional - replaced equality check with false → KILLED
			if (values[i] != 0) {
152 2 1. countNonZeros : Changed increment from 1 to -1 → KILLED
2. countNonZeros : Removed increment 1 → KILLED
				numNonZeros++;
153
			}
154
		}
155 1 1. countNonZeros : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::countNonZeros → KILLED
		return numNonZeros;
156
	}
157
158
	@Override
159
	public int hashCode() {
160 1 1. hashCode : Substituted 31 with 32 → NO_COVERAGE
		final int prime = 31;
161 1 1. hashCode : Substituted 1 with 0 → NO_COVERAGE
		int result = 1;
162 3 1. hashCode : Replaced integer addition with subtraction → NO_COVERAGE
2. hashCode : Replaced integer multiplication with division → NO_COVERAGE
3. hashCode : Substituted 31 with 32 → NO_COVERAGE
		result = prime * result + maxValue;
163 3 1. hashCode : Substituted 31 with 32 → NO_COVERAGE
2. hashCode : Replaced integer addition with subtraction → NO_COVERAGE
3. hashCode : Replaced integer multiplication with division → NO_COVERAGE
		result = prime * result + minValue;
164 3 1. hashCode : Substituted 31 with 32 → NO_COVERAGE
2. hashCode : Replaced integer multiplication with division → NO_COVERAGE
3. hashCode : Replaced integer addition with subtraction → NO_COVERAGE
		result = prime * result + size;
165 4 1. hashCode : Replaced integer addition with subtraction → NO_COVERAGE
2. hashCode : Substituted 31 with 32 → NO_COVERAGE
3. hashCode : Replaced integer multiplication with division → NO_COVERAGE
4. hashCode : removed call to java/util/Arrays::hashCode → NO_COVERAGE
		result = prime * result + Arrays.hashCode(values);
166 1 1. hashCode : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::hashCode → NO_COVERAGE
		return result;
167
	}
168
169
	@Override
170
	public boolean equals(Object obj) {
171 2 1. equals : removed conditional - replaced equality check with true → KILLED
2. equals : negated conditional → KILLED
		if (this == obj)
172 2 1. equals : Substituted 1 with 0 → KILLED
2. equals : replaced boolean return with false for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → KILLED
			return true;
173 3 1. equals : removed conditional - replaced equality check with false → SURVIVED
2. equals : negated conditional → KILLED
3. equals : removed conditional - replaced equality check with true → KILLED
		if (obj == null)
174 2 1. equals : Substituted 0 with 1 → NO_COVERAGE
2. equals : replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE
			return false;
175 5 1. equals : removed conditional - replaced equality check with false → SURVIVED
2. equals : removed call to java/lang/Object::getClass → KILLED
3. equals : removed call to java/lang/Object::getClass → KILLED
4. equals : removed conditional - replaced equality check with true → KILLED
5. equals : negated conditional → KILLED
		if (getClass() != obj.getClass())
176 2 1. equals : Substituted 0 with 1 → NO_COVERAGE
2. equals : replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE
			return false;
177
		IntChromosome other = (IntChromosome) obj;
178 3 1. equals : removed conditional - replaced equality check with false → SURVIVED
2. equals : negated conditional → KILLED
3. equals : removed conditional - replaced equality check with true → KILLED
		if (maxValue != other.maxValue)
179 2 1. equals : Substituted 0 with 1 → NO_COVERAGE
2. equals : replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE
			return false;
180 3 1. equals : removed conditional - replaced equality check with false → SURVIVED
2. equals : removed conditional - replaced equality check with true → KILLED
3. equals : negated conditional → KILLED
		if (minValue != other.minValue)
181 2 1. equals : Substituted 0 with 1 → NO_COVERAGE
2. equals : replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE
			return false;
182 3 1. equals : removed conditional - replaced equality check with false → SURVIVED
2. equals : removed conditional - replaced equality check with true → KILLED
3. equals : negated conditional → KILLED
		if (size != other.size)
183 2 1. equals : Substituted 0 with 1 → NO_COVERAGE
2. equals : replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE
			return false;
184 4 1. equals : removed call to java/util/Arrays::equals → KILLED
2. equals : removed conditional - replaced equality check with false → KILLED
3. equals : removed conditional - replaced equality check with true → KILLED
4. equals : negated conditional → KILLED
		if (!Arrays.equals(values, other.values))
185 2 1. equals : Substituted 0 with 1 → KILLED
2. equals : replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → KILLED
			return false;
186 2 1. equals : replaced boolean return with false for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → KILLED
2. equals : Substituted 1 with 0 → KILLED
		return true;
187
	}
188
189
	@Override
190
	public String toString() {
191 1 1. toString : replaced return value with "" for net/bmahe/genetics4j/core/chromosomes/IntChromosome::toString → SURVIVED
		return "IntChromosome [size=" + size + ", minValue=" + minValue + ", maxValue=" + maxValue + ", values="
192 1 1. toString : removed call to java/util/Arrays::toString → SURVIVED
				+ Arrays.toString(values) + "]";
193
	}
194
}

Mutations

62

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosWithNegativeValues()]
Removed assignment to member variable size → KILLED

63

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
Removed assignment to member variable minValue → KILLED

64

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
Removed assignment to member variable maxValue → KILLED

65

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosWithAllZeros()]
Removed assignment to member variable values → KILLED

2.2
Location : <init>
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
replaced call to java/util/Arrays::copyOf with argument → KILLED

3.3
Location : <init>
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosWithAllZeros()]
removed call to java/util/Arrays::copyOf → KILLED

70

1.1
Location : getNumAlleles
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getNumAlleles → KILLED

83

1.1
Location : getAllele
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getAllele → KILLED

92

1.1
Location : getSize
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getSize → KILLED

101

1.1
Location : getMinValue
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getMinValue → KILLED

110

1.1
Location : getMaxValue
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getMaxValue → KILLED

121

1.1
Location : getValues
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
replaced return value with null for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getValues → KILLED

133

1.1
Location : sum
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testSumSingleElement()]
Substituted 0 with 1 → KILLED

134

1.1
Location : sum
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testSumSingleElement()]
negated conditional → KILLED

2.2
Location : sum
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testSumSingleElement()]
Substituted 0 with 1 → KILLED

3.3
Location : sum
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testSumSingleElement()]
removed conditional - replaced comparison check with true → KILLED

4.4
Location : sum
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testSumSingleElement()]
changed conditional boundary → KILLED

5.5
Location : sum
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testSumSingleElement()]
removed conditional - replaced comparison check with false → KILLED

135

1.1
Location : sum
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testSumSingleElement()]
Replaced integer addition with subtraction → KILLED

138

1.1
Location : sum
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testSumSingleElement()]
replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::sum → KILLED

149

1.1
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
Substituted 0 with 1 → KILLED

150

1.1
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
removed conditional - replaced comparison check with false → KILLED

2.2
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
removed conditional - replaced comparison check with true → KILLED

3.3
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
changed conditional boundary → KILLED

4.4
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
negated conditional → KILLED

5.5
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
Substituted 0 with 1 → KILLED

151

1.1
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
negated conditional → KILLED

2.2
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
removed conditional - replaced equality check with true → KILLED

3.3
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
removed conditional - replaced equality check with false → KILLED

152

1.1
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
Changed increment from 1 to -1 → KILLED

2.2
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
Removed increment 1 → KILLED

155

1.1
Location : countNonZeros
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:testCountNonZerosSingleElement()]
replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::countNonZeros → KILLED

160

1.1
Location : hashCode
Killed by : none
Substituted 31 with 32 → NO_COVERAGE

161

1.1
Location : hashCode
Killed by : none
Substituted 1 with 0 → NO_COVERAGE

162

1.1
Location : hashCode
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

2.2
Location : hashCode
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

3.3
Location : hashCode
Killed by : none
Substituted 31 with 32 → NO_COVERAGE

163

1.1
Location : hashCode
Killed by : none
Substituted 31 with 32 → NO_COVERAGE

2.2
Location : hashCode
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

3.3
Location : hashCode
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

164

1.1
Location : hashCode
Killed by : none
Substituted 31 with 32 → NO_COVERAGE

2.2
Location : hashCode
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

3.3
Location : hashCode
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

165

1.1
Location : hashCode
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

2.2
Location : hashCode
Killed by : none
Substituted 31 with 32 → NO_COVERAGE

3.3
Location : hashCode
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

4.4
Location : hashCode
Killed by : none
removed call to java/util/Arrays::hashCode → NO_COVERAGE

166

1.1
Location : hashCode
Killed by : none
replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::hashCode → NO_COVERAGE

171

1.1
Location : equals
Killed by : net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
removed conditional - replaced equality check with true → KILLED

2.2
Location : equals
Killed by : net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
negated conditional → KILLED

172

1.1
Location : equals
Killed by : net.bmahe.genetics4j.core.GenotypeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.GenotypeTest]/[method:simple()]
Substituted 1 with 0 → KILLED

2.2
Location : equals
Killed by : net.bmahe.genetics4j.core.GenotypeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.GenotypeTest]/[method:simple()]
replaced boolean return with false for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → KILLED

173

1.1
Location : equals
Killed by : none
removed conditional - replaced equality check with false → SURVIVED
Covering tests

2.2
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
negated conditional → KILLED

3.3
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
removed conditional - replaced equality check with true → KILLED

174

1.1
Location : equals
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : equals
Killed by : none
replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE

175

1.1
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
removed call to java/lang/Object::getClass → KILLED

2.2
Location : equals
Killed by : none
removed conditional - replaced equality check with false → SURVIVED
Covering tests

3.3
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
removed call to java/lang/Object::getClass → KILLED

4.4
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
removed conditional - replaced equality check with true → KILLED

5.5
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
negated conditional → KILLED

176

1.1
Location : equals
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : equals
Killed by : none
replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE

178

1.1
Location : equals
Killed by : none
removed conditional - replaced equality check with false → SURVIVED
Covering tests

2.2
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
negated conditional → KILLED

3.3
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
removed conditional - replaced equality check with true → KILLED

179

1.1
Location : equals
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : equals
Killed by : none
replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE

180

1.1
Location : equals
Killed by : none
removed conditional - replaced equality check with false → SURVIVED
Covering tests

2.2
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
removed conditional - replaced equality check with true → KILLED

3.3
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
negated conditional → KILLED

181

1.1
Location : equals
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : equals
Killed by : none
replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE

182

1.1
Location : equals
Killed by : none
removed conditional - replaced equality check with false → SURVIVED
Covering tests

2.2
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
removed conditional - replaced equality check with true → KILLED

3.3
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
negated conditional → KILLED

183

1.1
Location : equals
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : equals
Killed by : none
replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → NO_COVERAGE

184

1.1
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
removed call to java/util/Arrays::equals → KILLED

2.2
Location : equals
Killed by : net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
removed conditional - replaced equality check with false → KILLED

3.3
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
removed conditional - replaced equality check with true → KILLED

4.4
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
negated conditional → KILLED

185

1.1
Location : equals
Killed by : net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
Substituted 0 with 1 → KILLED

2.2
Location : equals
Killed by : net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
replaced boolean return with true for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → KILLED

186

1.1
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
replaced boolean return with false for net/bmahe/genetics4j/core/chromosomes/IntChromosome::equals → KILLED

2.2
Location : equals
Killed by : net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
Substituted 1 with 0 → KILLED

191

1.1
Location : toString
Killed by : none
replaced return value with "" for net/bmahe/genetics4j/core/chromosomes/IntChromosome::toString → SURVIVED
Covering tests

192

1.1
Location : toString
Killed by : none
removed call to java/util/Arrays::toString → SURVIVED
Covering tests

Active mutators

Tests examined


Report generated by PIT 1.20.3