1
|
|
package net.bmahe.genetics4j.core.chromosomes; |
2
|
|
|
3
|
|
import java.util.Arrays; |
4
|
|
|
5
|
|
import org.apache.commons.lang3.Validate; |
6
|
|
|
7
|
|
/** |
8
|
|
* A chromosome implementation that represents genetic information as an array of integer values. |
9
|
|
* |
10
|
|
* <p>IntChromosome is widely used for discrete optimization problems where solutions can be |
11
|
|
* encoded as sequences of integer values within specified ranges. Each position in the array |
12
|
|
* represents a gene, and the integer value at that position represents the allele. |
13
|
|
* |
14
|
|
* <p>This chromosome type is particularly suitable for: |
15
|
|
* <ul> |
16
|
|
* <li><strong>Combinatorial optimization</strong>: Problems with discrete decision variables</li> |
17
|
|
* <li><strong>Parameter optimization</strong>: Integer hyperparameters, configuration settings</li> |
18
|
|
* <li><strong>Permutation encoding</strong>: When combined with appropriate operators</li> |
19
|
|
* <li><strong>Resource allocation</strong>: Assignment and scheduling problems</li> |
20
|
|
* <li><strong>Graph problems</strong>: Node labeling, path encoding</li> |
21
|
|
* </ul> |
22
|
|
* |
23
|
|
* <p>Key features: |
24
|
|
* <ul> |
25
|
|
* <li><strong>Bounded values</strong>: All integers are constrained to [minValue, maxValue]</li> |
26
|
|
* <li><strong>Fixed length</strong>: Chromosome size is determined at creation time</li> |
27
|
|
* <li><strong>Immutable</strong>: Values cannot be changed after construction</li> |
28
|
|
* <li><strong>Type-safe</strong>: Compile-time guarantees for integer operations</li> |
29
|
|
* </ul> |
30
|
|
* |
31
|
|
* <p>The chromosome maintains bounds information which is used by genetic operators |
32
|
|
* to ensure that crossover and mutation operations produce valid offspring within |
33
|
|
* 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, |
54
|
|
* if values array is null, or if the array length |
55
|
|
* doesn't match the specified size |
56
|
|
*/ |
57
|
|
public IntChromosome(final int _size, final int _minValue, final int _maxValue, final int[] _values) { |
58
|
|
Validate.isTrue(_size > 0); |
59
|
|
Validate.isTrue(_minValue <= _maxValue); |
60
|
|
Validate.notNull(_values); |
61
|
|
Validate.isTrue(_size == _values.length, "Provided size does not match the size of the content"); |
62
|
|
|
63
|
1
1. <init> : Removed assignment to member variable size → KILLED
|
this.size = _size; |
64
|
1
1. <init> : Removed assignment to member variable minValue → KILLED
|
this.minValue = _minValue; |
65
|
1
1. <init> : Removed assignment to member variable maxValue → KILLED
|
this.maxValue = _maxValue; |
66
|
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); |
67
|
|
} |
68
|
|
|
69
|
|
@Override |
70
|
|
public int getNumAlleles() { |
71
|
1
1. getNumAlleles : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getNumAlleles → KILLED
|
return size; |
72
|
|
} |
73
|
|
|
74
|
|
/** |
75
|
|
* Returns the integer value at the specified index. |
76
|
|
* |
77
|
|
* @param index the index of the allele to retrieve (0-based) |
78
|
|
* @return the integer value at the specified position |
79
|
|
* @throws IllegalArgumentException if index is negative or greater than or equal to the chromosome size |
80
|
|
*/ |
81
|
|
public int getAllele(final int index) { |
82
|
|
Validate.inclusiveBetween(0, size - 1, index); |
83
|
|
|
84
|
1
1. getAllele : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getAllele → KILLED
|
return values[index]; |
85
|
|
} |
86
|
|
|
87
|
|
/** |
88
|
|
* Returns the number of integer values in this chromosome. |
89
|
|
* |
90
|
|
* @return the chromosome size |
91
|
|
*/ |
92
|
|
public int getSize() { |
93
|
1
1. getSize : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getSize → KILLED
|
return size; |
94
|
|
} |
95
|
|
|
96
|
|
/** |
97
|
|
* Returns the minimum allowed value for integers in this chromosome. |
98
|
|
* |
99
|
|
* @return the minimum value constraint |
100
|
|
*/ |
101
|
|
public int getMinValue() { |
102
|
1
1. getMinValue : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getMinValue → KILLED
|
return minValue; |
103
|
|
} |
104
|
|
|
105
|
|
/** |
106
|
|
* Returns the maximum allowed value for integers in this chromosome. |
107
|
|
* |
108
|
|
* @return the maximum value constraint |
109
|
|
*/ |
110
|
|
public int getMaxValue() { |
111
|
1
1. getMaxValue : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getMaxValue → KILLED
|
return maxValue; |
112
|
|
} |
113
|
|
|
114
|
|
/** |
115
|
|
* Returns a copy of the integer values in this chromosome. |
116
|
|
* |
117
|
|
* <p>The returned array is a defensive copy; modifications to it will not |
118
|
|
* affect this chromosome. |
119
|
|
* |
120
|
|
* @return a copy of the integer values array |
121
|
|
*/ |
122
|
|
public int[] getValues() { |
123
|
1
1. getValues : replaced return value with null for net/bmahe/genetics4j/core/chromosomes/IntChromosome::getValues → KILLED
|
return values; |
124
|
|
} |
125
|
|
|
126
|
|
@Override |
127
|
|
public int hashCode() { |
128
|
1
1. hashCode : Substituted 31 with 32 → NO_COVERAGE
|
final int prime = 31; |
129
|
1
1. hashCode : Substituted 1 with 0 → NO_COVERAGE
|
int result = 1; |
130
|
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; |
131
|
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; |
132
|
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; |
133
|
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); |
134
|
1
1. hashCode : replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::hashCode → NO_COVERAGE
|
return result; |
135
|
|
} |
136
|
|
|
137
|
|
@Override |
138
|
|
public boolean equals(Object obj) { |
139
|
2
1. equals : removed conditional - replaced equality check with true → KILLED
2. equals : negated conditional → KILLED
|
if (this == obj) |
140
|
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; |
141
|
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) |
142
|
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; |
143
|
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()) |
144
|
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; |
145
|
|
IntChromosome other = (IntChromosome) obj; |
146
|
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) |
147
|
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; |
148
|
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) |
149
|
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; |
150
|
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) |
151
|
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; |
152
|
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)) |
153
|
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; |
154
|
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; |
155
|
|
} |
156
|
|
|
157
|
|
@Override |
158
|
|
public String toString() { |
159
|
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=" |
160
|
1
1. toString : removed call to java/util/Arrays::toString → SURVIVED
|
+ Arrays.toString(values) + "]"; |
161
|
|
} |
162
|
|
} |
| | Mutations |
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 size → 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 minValue → 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:simple()] Removed assignment to member variable maxValue → KILLED
|
66 |
|
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 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:simple()] removed call to java/util/Arrays::copyOf → KILLED
|
71 |
|
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
|
84 |
|
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
|
93 |
|
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
|
102 |
|
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
|
111 |
|
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
|
123 |
|
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
|
128 |
|
1.1 Location : hashCode Killed by : none Substituted 31 with 32 → NO_COVERAGE
|
129 |
|
1.1 Location : hashCode Killed by : none Substituted 1 with 0 → NO_COVERAGE
|
130 |
|
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
|
131 |
|
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
|
132 |
|
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
|
133 |
|
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
|
134 |
|
1.1 Location : hashCode Killed by : none replaced int return with 0 for net/bmahe/genetics4j/core/chromosomes/IntChromosome::hashCode → NO_COVERAGE
|
139 |
|
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
|
140 |
|
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
|
141 |
|
1.1 Location : equals Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
- net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
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
|
142 |
|
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
|
143 |
|
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
Covered by tests:
- net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
- net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
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
|
144 |
|
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
|
146 |
|
1.1 Location : equals Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
- net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
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
|
147 |
|
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
|
148 |
|
1.1 Location : equals Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
- net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
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
|
149 |
|
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
|
150 |
|
1.1 Location : equals Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.IntChromosomeTest]/[method:simple()]
- net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
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
|
151 |
|
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
|
152 |
|
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
|
153 |
|
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
|
154 |
|
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
|
159 |
|
1.1 Location : toString Killed by : none replaced return value with "" for net/bmahe/genetics4j/core/chromosomes/IntChromosome::toString → SURVIVED
Covering tests
Covered by tests:
- net.bmahe.genetics4j.core.postevaluationprocess.FitnessSharingTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.postevaluationprocess.FitnessSharingTest]/[method:simple()]
- net.bmahe.genetics4j.core.combination.erx.IntEdgeRecombinationCrossoverTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.combination.erx.IntEdgeRecombinationCrossoverTest]/[method:simple()]
- net.bmahe.genetics4j.core.replacement.ElitismImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.ElitismImplTest]/[method:simple()]
- net.bmahe.genetics4j.core.replacement.ElitismImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.ElitismImplTest]/[method:atLeastSpecified()]
- net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
|
160 |
|
1.1 Location : toString Killed by : none removed call to java/util/Arrays::toString → SURVIVED
Covering tests
Covered by tests:
- net.bmahe.genetics4j.core.postevaluationprocess.FitnessSharingTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.postevaluationprocess.FitnessSharingTest]/[method:simple()]
- net.bmahe.genetics4j.core.combination.erx.IntEdgeRecombinationCrossoverTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.combination.erx.IntEdgeRecombinationCrossoverTest]/[method:simple()]
- net.bmahe.genetics4j.core.replacement.ElitismImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.ElitismImplTest]/[method:simple()]
- net.bmahe.genetics4j.core.replacement.ElitismImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.ElitismImplTest]/[method:atLeastSpecified()]
- net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.replacement.DeleteNLastImplTest]/[method:select()]
|