TournamentNSGA2Selector.java

1
package net.bmahe.genetics4j.moo.nsga2.impl;
2
3
import java.util.Comparator;
4
import java.util.List;
5
import java.util.Objects;
6
import java.util.Set;
7
import java.util.TreeSet;
8
import java.util.function.Function;
9
import java.util.random.RandomGenerator;
10
11
import org.apache.commons.lang3.Validate;
12
import org.apache.logging.log4j.LogManager;
13
import org.apache.logging.log4j.Logger;
14
15
import net.bmahe.genetics4j.core.Genotype;
16
import net.bmahe.genetics4j.core.Population;
17
import net.bmahe.genetics4j.core.selection.Selector;
18
import net.bmahe.genetics4j.core.spec.AbstractEAConfiguration;
19
import net.bmahe.genetics4j.moo.ObjectiveDistance;
20
import net.bmahe.genetics4j.moo.ParetoUtils;
21
import net.bmahe.genetics4j.moo.nsga2.spec.TournamentNSGA2Selection;
22
23
public class TournamentNSGA2Selector<T extends Comparable<T>> implements Selector<T> {
24
	final static public Logger logger = LogManager.getLogger(TournamentNSGA2Selector.class);
25
26
	private final TournamentNSGA2Selection<T> tournamentNSGA2Selection;
27
	private final RandomGenerator randomGenerator;
28
29
	public TournamentNSGA2Selector(final RandomGenerator _randomGenerator,
30
			final TournamentNSGA2Selection<T> _tournamentNSGA2Selection) {
31
		Objects.requireNonNull(_randomGenerator);
32
		Objects.requireNonNull(_tournamentNSGA2Selection);
33
34 1 1. <init> : Removed assignment to member variable randomGenerator → KILLED
		this.randomGenerator = _randomGenerator;
35 1 1. <init> : Removed assignment to member variable tournamentNSGA2Selection → KILLED
		this.tournamentNSGA2Selection = _tournamentNSGA2Selection;
36
37
	}
38
39
	@Override
40
	public Population<T> select(final AbstractEAConfiguration<T> eaConfiguration, final long generation,
41
			final int numIndividuals, final List<Genotype> population, final List<T> fitnessScore) {
42
		Objects.requireNonNull(eaConfiguration);
43
		Objects.requireNonNull(population);
44
		Objects.requireNonNull(fitnessScore);
45
		Validate.isTrue(generation >= 0);
46
		Validate.isTrue(numIndividuals > 0);
47
		Validate.isTrue(population.size() == fitnessScore.size());
48
49
		logger.debug("Incoming population size is {}", population.size());
50
51 1 1. select : removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED
		final Population<T> individuals = new Population<>();
52 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::deduplicate → KILLED
		if (tournamentNSGA2Selection.deduplicate()
53 4 1. select : removed call to java/util/Optional::isPresent → SURVIVED
2. select : removed conditional - replaced equality check with false → SURVIVED
3. select : negated conditional → KILLED
4. select : removed conditional - replaced equality check with true → KILLED
				.isPresent()) {
54 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::deduplicate → NO_COVERAGE
			final Comparator<Genotype> individualDeduplicator = tournamentNSGA2Selection.deduplicate()
55 1 1. select : removed call to java/util/Optional::get → NO_COVERAGE
					.get();
56 1 1. select : removed call to java/util/TreeSet::<init> → NO_COVERAGE
			final Set<Genotype> seenGenotype = new TreeSet<>(individualDeduplicator);
57
58 6 1. select : removed conditional - replaced comparison check with false → NO_COVERAGE
2. select : changed conditional boundary → NO_COVERAGE
3. select : removed conditional - replaced comparison check with true → NO_COVERAGE
4. select : negated conditional → NO_COVERAGE
5. select : Substituted 0 with 1 → NO_COVERAGE
6. select : removed call to java/util/List::size → NO_COVERAGE
			for (int i = 0; i < population.size(); i++) {
59 1 1. select : removed call to java/util/List::get → NO_COVERAGE
				final Genotype genotype = population.get(i);
60 1 1. select : removed call to java/util/List::get → NO_COVERAGE
				final T fitness = fitnessScore.get(i);
61
62 4 1. select : negated conditional → NO_COVERAGE
2. select : removed conditional - replaced equality check with false → NO_COVERAGE
3. select : removed conditional - replaced equality check with true → NO_COVERAGE
4. select : removed call to java/util/Set::add → NO_COVERAGE
				if (seenGenotype.add(genotype)) {
63 1 1. select : removed call to net/bmahe/genetics4j/core/Population::add → NO_COVERAGE
					individuals.add(genotype, fitness);
64
				}
65
			}
66
67
		} else {
68 6 1. select : Substituted 0 with 1 → SURVIVED
2. select : negated conditional → KILLED
3. select : removed conditional - replaced comparison check with true → KILLED
4. select : removed call to java/util/List::size → KILLED
5. select : changed conditional boundary → KILLED
6. select : removed conditional - replaced comparison check with false → KILLED
			for (int i = 0; i < population.size(); i++) {
69 1 1. select : removed call to java/util/List::get → KILLED
				final Genotype genotype = population.get(i);
70 1 1. select : removed call to java/util/List::get → KILLED
				final T fitness = fitnessScore.get(i);
71
72 1 1. select : removed call to net/bmahe/genetics4j/core/Population::add → KILLED
				individuals.add(genotype, fitness);
73
			}
74
		}
75
76
		logger.debug("Selecting {} individuals from a population of {}", numIndividuals, individuals.size());
77
78 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::numberObjectives → KILLED
		final int numberObjectives = tournamentNSGA2Selection.numberObjectives();
79
80 6 1. select : removed call to net/bmahe/genetics4j/core/spec/Optimization::ordinal → SURVIVED
2. select : RemoveSwitch 1 (case value 2) → SURVIVED
3. select : removed call to java/lang/MatchException::<init> → NO_COVERAGE
4. select : Changed switch default to be first case → KILLED
5. select : RemoveSwitch 0 (case value 1) → KILLED
6. select : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::optimization → KILLED
		final Comparator<T> dominance = switch (eaConfiguration.optimization()) {
81 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::dominance → KILLED
			case MAXIMIZE -> tournamentNSGA2Selection.dominance();
82 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::dominance → NO_COVERAGE
			case MINIMIZE -> tournamentNSGA2Selection.dominance()
83 2 1. select : removed call to java/util/Comparator::reversed → NO_COVERAGE
2. select : replaced call to java/util/Comparator::reversed with receiver → NO_COVERAGE
					.reversed();
84
		};
85
86 6 1. select : removed call to net/bmahe/genetics4j/core/spec/Optimization::ordinal → SURVIVED
2. select : removed call to java/lang/MatchException::<init> → NO_COVERAGE
3. select : RemoveSwitch 1 (case value 2) → SURVIVED
4. select : Changed switch default to be first case → KILLED
5. select : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::optimization → KILLED
6. select : RemoveSwitch 0 (case value 1) → KILLED
		final Function<Integer, Comparator<T>> objectiveComparator = switch (eaConfiguration.optimization()) {
87 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::objectiveComparator → KILLED
			case MAXIMIZE -> tournamentNSGA2Selection.objectiveComparator();
88 1 1. lambda$select$0 : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::objectiveComparator → NO_COVERAGE
			case MINIMIZE -> (m) -> tournamentNSGA2Selection.objectiveComparator()
89 3 1. lambda$select$0 : replaced call to java/util/function/Function::apply with argument → NO_COVERAGE
2. lambda$select$0 : removed call to java/util/function/Function::apply → NO_COVERAGE
3. lambda$select$0 : replaced return value with null for net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2Selector::lambda$select$0 → NO_COVERAGE
					.apply(m)
90 2 1. lambda$select$0 : removed call to java/util/Comparator::reversed → NO_COVERAGE
2. lambda$select$0 : replaced call to java/util/Comparator::reversed with receiver → NO_COVERAGE
					.reversed();
91
		};
92
93 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::distance → KILLED
		final ObjectiveDistance<T> objectiveDistance = tournamentNSGA2Selection.distance();
94 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::numCandidates → KILLED
		final int numCandidates = tournamentNSGA2Selection.numCandidates();
95
96
		logger.debug("Ranking population");
97 2 1. select : removed call to net/bmahe/genetics4j/moo/ParetoUtils::rankedPopulation → KILLED
2. select : replaced call to net/bmahe/genetics4j/moo/ParetoUtils::rankedPopulation with argument → KILLED
		final List<Set<Integer>> rankedPopulation = ParetoUtils.rankedPopulation(dominance,
98 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getAllFitnesses → KILLED
				individuals.getAllFitnesses());
99
		// Build a reverse index
100 1 1. select : removed call to net/bmahe/genetics4j/core/Population::size → KILLED
		final int[] individual2Rank = new int[individuals.size()];
101 6 1. select : removed call to java/util/List::size → SURVIVED
2. select : Substituted 0 with 1 → SURVIVED
3. select : negated conditional → SURVIVED
4. select : removed conditional - replaced comparison check with false → SURVIVED
5. select : changed conditional boundary → KILLED
6. select : removed conditional - replaced comparison check with true → KILLED
		for (int j = 0; j < rankedPopulation.size(); j++) {
102 1 1. select : removed call to java/util/List::get → KILLED
			final Set<Integer> set = rankedPopulation.get(j);
103
104
			for (final Integer idx : set) {
105 1 1. select : removed call to java/lang/Integer::intValue → SURVIVED
				individual2Rank[idx] = j;
106
			}
107
		}
108
109
		if (logger.isTraceEnabled()) {
110
			logger.trace("Ranked population: {}", rankedPopulation);
111 6 1. select : removed call to java/util/List::size → NO_COVERAGE
2. select : Substituted 0 with 1 → NO_COVERAGE
3. select : changed conditional boundary → NO_COVERAGE
4. select : removed conditional - replaced comparison check with true → NO_COVERAGE
5. select : negated conditional → NO_COVERAGE
6. select : removed conditional - replaced comparison check with false → NO_COVERAGE
			for (int i = 0; i < rankedPopulation.size(); i++) {
112 1 1. select : removed call to java/util/List::get → NO_COVERAGE
				final Set<Integer> subPopulationIdx = rankedPopulation.get(i);
113
				logger.trace("\tRank {}", i);
114
				for (final Integer index : subPopulationIdx) {
115
					logger.trace("\t\t{} - Fitness {}", index, individuals.getFitness(index));
116
				}
117
			}
118
		}
119
		logger.debug("Computing crowding distance assignment");
120 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/impl/NSGA2Utils::crowdingDistanceAssignment → KILLED
		final double[] crowdingDistanceAssignment = NSGA2Utils.crowdingDistanceAssignment(numberObjectives,
121 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getAllFitnesses → KILLED
				individuals.getAllFitnesses(),
122
				objectiveComparator,
123
				objectiveDistance);
124
125
		logger.debug("Performing tournaments");
126 1 1. select : removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED
		final Population<T> selectedIndividuals = new Population<>();
127 5 1. select : removed call to net/bmahe/genetics4j/core/Population::size → TIMED_OUT
2. select : removed conditional - replaced comparison check with true → TIMED_OUT
3. select : changed conditional boundary → KILLED
4. select : negated conditional → KILLED
5. select : removed conditional - replaced comparison check with false → KILLED
		while (selectedIndividuals.size() < numIndividuals) {
128
129
			logger.trace("Performing tournament");
130
			Genotype bestCandidate = null;
131 1 1. select : Substituted -1 with 0 → SURVIVED
			int bestCandidateIndex = -1;
132
			T bestFitness = null;
133
134 5 1. select : changed conditional boundary → SURVIVED
2. select : Substituted 0 with 1 → SURVIVED
3. select : removed conditional - replaced comparison check with true → TIMED_OUT
4. select : removed conditional - replaced comparison check with false → KILLED
5. select : negated conditional → KILLED
			for (int i = 0; i < numCandidates; i++) {
135 3 1. select : removed call to net/bmahe/genetics4j/core/Population::size → SURVIVED
2. select : removed call to java/util/random/RandomGenerator::nextInt → SURVIVED
3. select : replaced call to java/util/random/RandomGenerator::nextInt with argument → KILLED
				final int candidateIndex = randomGenerator.nextInt(individuals.size());
136
137
				logger.trace("\tCandidate - index {} - rank {} - crowding distance {} - fitness {}",
138 1 1. select : removed call to java/lang/Integer::valueOf → SURVIVED
						candidateIndex,
139 1 1. select : removed call to java/lang/Integer::valueOf → SURVIVED
						individual2Rank[candidateIndex],
140 1 1. select : removed call to java/lang/Double::valueOf → SURVIVED
						crowdingDistanceAssignment[candidateIndex],
141 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getFitness → SURVIVED
						individuals.getFitness(candidateIndex));
142
143 14 1. select : negated conditional → SURVIVED
2. select : removed conditional - replaced comparison check with true → SURVIVED
3. select : negated conditional → SURVIVED
4. select : removed conditional - replaced comparison check with true → SURVIVED
5. select : changed conditional boundary → SURVIVED
6. select : removed conditional - replaced equality check with true → SURVIVED
7. select : changed conditional boundary → SURVIVED
8. select : negated conditional → SURVIVED
9. select : removed conditional - replaced equality check with false → SURVIVED
10. select : removed conditional - replaced comparison check with false → SURVIVED
11. select : removed conditional - replaced equality check with false → SURVIVED
12. select : removed conditional - replaced comparison check with false → SURVIVED
13. select : negated conditional → KILLED
14. select : removed conditional - replaced equality check with true → KILLED
				if (bestCandidate == null || individual2Rank[candidateIndex] < individual2Rank[bestCandidateIndex]
144
						|| (individual2Rank[candidateIndex] == individual2Rank[bestCandidateIndex]
145
								&& crowdingDistanceAssignment[candidateIndex] > crowdingDistanceAssignment[bestCandidateIndex])) {
146
147
					logger.trace("\t candidate win!");
148 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getGenotype → KILLED
					bestCandidate = individuals.getGenotype(candidateIndex);
149 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getFitness → KILLED
					bestFitness = individuals.getFitness(candidateIndex);
150
					bestCandidateIndex = candidateIndex;
151
				}
152
			}
153
154 1 1. select : removed call to net/bmahe/genetics4j/core/Population::add → TIMED_OUT
			selectedIndividuals.add(bestCandidate, bestFitness);
155
		}
156
157 1 1. select : replaced return value with null for net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2Selector::select → KILLED
		return selectedIndividuals;
158
	}
159
}

Mutations

34

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
Removed assignment to member variable randomGenerator → KILLED

35

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
Removed assignment to member variable tournamentNSGA2Selection → KILLED

51

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED

52

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::deduplicate → KILLED

53

1.1
Location : select
Killed by : none
removed call to java/util/Optional::isPresent → SURVIVED
Covering tests

2.2
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
negated conditional → KILLED

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

4.4
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed conditional - replaced equality check with true → KILLED

54

1.1
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::deduplicate → NO_COVERAGE

55

1.1
Location : select
Killed by : none
removed call to java/util/Optional::get → NO_COVERAGE

56

1.1
Location : select
Killed by : none
removed call to java/util/TreeSet::<init> → NO_COVERAGE

58

1.1
Location : select
Killed by : none
removed conditional - replaced comparison check with false → NO_COVERAGE

2.2
Location : select
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : select
Killed by : none
removed conditional - replaced comparison check with true → NO_COVERAGE

4.4
Location : select
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : select
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

6.6
Location : select
Killed by : none
removed call to java/util/List::size → NO_COVERAGE

59

1.1
Location : select
Killed by : none
removed call to java/util/List::get → NO_COVERAGE

60

1.1
Location : select
Killed by : none
removed call to java/util/List::get → NO_COVERAGE

62

1.1
Location : select
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : select
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

3.3
Location : select
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

4.4
Location : select
Killed by : none
removed call to java/util/Set::add → NO_COVERAGE

63

1.1
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/core/Population::add → NO_COVERAGE

68

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
negated conditional → KILLED

2.2
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed conditional - replaced comparison check with true → KILLED

3.3
Location : select
Killed by : none
Substituted 0 with 1 → SURVIVED
Covering tests

4.4
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to java/util/List::size → KILLED

5.5
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
changed conditional boundary → KILLED

6.6
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed conditional - replaced comparison check with false → KILLED

69

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to java/util/List::get → KILLED

70

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to java/util/List::get → KILLED

72

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/Population::add → KILLED

78

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::numberObjectives → KILLED

80

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
Changed switch default to be first case → KILLED

2.2
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
RemoveSwitch 0 (case value 1) → KILLED

3.3
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/Optimization::ordinal → SURVIVED
Covering tests

4.4
Location : select
Killed by : none
RemoveSwitch 1 (case value 2) → SURVIVED Covering tests

5.5
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::optimization → KILLED

6.6
Location : select
Killed by : none
removed call to java/lang/MatchException::<init> → NO_COVERAGE

81

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::dominance → KILLED

82

1.1
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::dominance → NO_COVERAGE

83

1.1
Location : select
Killed by : none
removed call to java/util/Comparator::reversed → NO_COVERAGE

2.2
Location : select
Killed by : none
replaced call to java/util/Comparator::reversed with receiver → NO_COVERAGE

86

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
Changed switch default to be first case → KILLED

2.2
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/Optimization::ordinal → SURVIVED
Covering tests

3.3
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::optimization → KILLED

4.4
Location : select
Killed by : none
removed call to java/lang/MatchException::<init> → NO_COVERAGE

5.5
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
RemoveSwitch 0 (case value 1) → KILLED

6.6
Location : select
Killed by : none
RemoveSwitch 1 (case value 2) → SURVIVED Covering tests

87

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::objectiveComparator → KILLED

88

1.1
Location : lambda$select$0
Killed by : none
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::objectiveComparator → NO_COVERAGE

89

1.1
Location : lambda$select$0
Killed by : none
replaced call to java/util/function/Function::apply with argument → NO_COVERAGE

2.2
Location : lambda$select$0
Killed by : none
removed call to java/util/function/Function::apply → NO_COVERAGE

3.3
Location : lambda$select$0
Killed by : none
replaced return value with null for net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2Selector::lambda$select$0 → NO_COVERAGE

90

1.1
Location : lambda$select$0
Killed by : none
removed call to java/util/Comparator::reversed → NO_COVERAGE

2.2
Location : lambda$select$0
Killed by : none
replaced call to java/util/Comparator::reversed with receiver → NO_COVERAGE

93

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::distance → KILLED

94

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::numCandidates → KILLED

97

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/moo/ParetoUtils::rankedPopulation → KILLED

2.2
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
replaced call to net/bmahe/genetics4j/moo/ParetoUtils::rankedPopulation with argument → KILLED

98

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/Population::getAllFitnesses → KILLED

100

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/Population::size → KILLED

101

1.1
Location : select
Killed by : none
removed call to java/util/List::size → SURVIVED
Covering tests

2.2
Location : select
Killed by : none
Substituted 0 with 1 → SURVIVED Covering tests

3.3
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
changed conditional boundary → KILLED

4.4
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed conditional - replaced comparison check with true → KILLED

5.5
Location : select
Killed by : none
negated conditional → SURVIVED Covering tests

6.6
Location : select
Killed by : none
removed conditional - replaced comparison check with false → SURVIVED Covering tests

102

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to java/util/List::get → KILLED

105

1.1
Location : select
Killed by : none
removed call to java/lang/Integer::intValue → SURVIVED
Covering tests

111

1.1
Location : select
Killed by : none
removed call to java/util/List::size → NO_COVERAGE

2.2
Location : select
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

3.3
Location : select
Killed by : none
changed conditional boundary → NO_COVERAGE

4.4
Location : select
Killed by : none
removed conditional - replaced comparison check with true → NO_COVERAGE

5.5
Location : select
Killed by : none
negated conditional → NO_COVERAGE

6.6
Location : select
Killed by : none
removed conditional - replaced comparison check with false → NO_COVERAGE

112

1.1
Location : select
Killed by : none
removed call to java/util/List::get → NO_COVERAGE

120

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/moo/nsga2/impl/NSGA2Utils::crowdingDistanceAssignment → KILLED

121

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/Population::getAllFitnesses → KILLED

126

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED

127

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
changed conditional boundary → KILLED

2.2
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/core/Population::size → TIMED_OUT

3.3
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
negated conditional → KILLED

4.4
Location : select
Killed by : none
removed conditional - replaced comparison check with true → TIMED_OUT

5.5
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed conditional - replaced comparison check with false → KILLED

131

1.1
Location : select
Killed by : none
Substituted -1 with 0 → SURVIVED
Covering tests

134

1.1
Location : select
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

2.2
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed conditional - replaced comparison check with false → KILLED

3.3
Location : select
Killed by : none
Substituted 0 with 1 → SURVIVED Covering tests

4.4
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
negated conditional → KILLED

5.5
Location : select
Killed by : none
removed conditional - replaced comparison check with true → TIMED_OUT

135

1.1
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/core/Population::size → SURVIVED
Covering tests

2.2
Location : select
Killed by : none
removed call to java/util/random/RandomGenerator::nextInt → SURVIVED Covering tests

3.3
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
replaced call to java/util/random/RandomGenerator::nextInt with argument → KILLED

138

1.1
Location : select
Killed by : none
removed call to java/lang/Integer::valueOf → SURVIVED
Covering tests

139

1.1
Location : select
Killed by : none
removed call to java/lang/Integer::valueOf → SURVIVED
Covering tests

140

1.1
Location : select
Killed by : none
removed call to java/lang/Double::valueOf → SURVIVED
Covering tests

141

1.1
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/core/Population::getFitness → SURVIVED
Covering tests

143

1.1
Location : select
Killed by : none
negated conditional → SURVIVED
Covering tests

2.2
Location : select
Killed by : none
removed conditional - replaced comparison check with true → SURVIVED Covering tests

3.3
Location : select
Killed by : none
negated conditional → SURVIVED Covering tests

4.4
Location : select
Killed by : none
removed conditional - replaced comparison check with true → SURVIVED Covering tests

5.5
Location : select
Killed by : none
changed conditional boundary → SURVIVED Covering tests

6.6
Location : select
Killed by : none
removed conditional - replaced equality check with true → SURVIVED Covering tests

7.7
Location : select
Killed by : none
changed conditional boundary → SURVIVED Covering tests

8.8
Location : select
Killed by : none
negated conditional → SURVIVED Covering tests

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

10.10
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
negated conditional → KILLED

11.11
Location : select
Killed by : none
removed conditional - replaced comparison check with false → SURVIVED Covering tests

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

13.13
Location : select
Killed by : none
removed conditional - replaced comparison check with false → SURVIVED Covering tests

14.14
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed conditional - replaced equality check with true → KILLED

148

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/Population::getGenotype → KILLED

149

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/Population::getFitness → KILLED

154

1.1
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/core/Population::add → TIMED_OUT

157

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
replaced return value with null for net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2Selector::select → KILLED

Active mutators

Tests examined


Report generated by PIT 1.20.3