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 5 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 call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::deduplicate → KILLED
5. select : removed conditional - replaced equality check with true → KILLED
		if (tournamentNSGA2Selection.deduplicate().isPresent()) {
53 2 1. select : removed call to java/util/Optional::get → NO_COVERAGE
2. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::deduplicate → NO_COVERAGE
			final Comparator<Genotype> individualDeduplicator = tournamentNSGA2Selection.deduplicate().get();
54 1 1. select : removed call to java/util/TreeSet::<init> → NO_COVERAGE
			final Set<Genotype> seenGenotype = new TreeSet<>(individualDeduplicator);
55
56 6 1. select : removed conditional - replaced comparison check with true → NO_COVERAGE
2. select : negated conditional → NO_COVERAGE
3. select : Substituted 0 with 1 → NO_COVERAGE
4. select : removed call to java/util/List::size → NO_COVERAGE
5. select : removed conditional - replaced comparison check with false → NO_COVERAGE
6. select : changed conditional boundary → NO_COVERAGE
			for (int i = 0; i < population.size(); i++) {
57 1 1. select : removed call to java/util/List::get → NO_COVERAGE
				final Genotype genotype = population.get(i);
58 1 1. select : removed call to java/util/List::get → NO_COVERAGE
				final T fitness = fitnessScore.get(i);
59
60 4 1. select : removed call to java/util/Set::add → NO_COVERAGE
2. select : negated conditional → NO_COVERAGE
3. select : removed conditional - replaced equality check with false → NO_COVERAGE
4. select : removed conditional - replaced equality check with true → NO_COVERAGE
				if (seenGenotype.add(genotype)) {
61 1 1. select : removed call to net/bmahe/genetics4j/core/Population::add → NO_COVERAGE
					individuals.add(genotype, fitness);
62
				}
63
			}
64
65
		} else {
66 6 1. select : Substituted 0 with 1 → SURVIVED
2. select : changed conditional boundary → KILLED
3. select : removed conditional - replaced comparison check with false → KILLED
4. select : removed call to java/util/List::size → KILLED
5. select : removed conditional - replaced comparison check with true → KILLED
6. select : negated conditional → KILLED
			for (int i = 0; i < population.size(); i++) {
67 1 1. select : removed call to java/util/List::get → KILLED
				final Genotype genotype = population.get(i);
68 1 1. select : removed call to java/util/List::get → KILLED
				final T fitness = fitnessScore.get(i);
69
70 1 1. select : removed call to net/bmahe/genetics4j/core/Population::add → KILLED
				individuals.add(genotype, fitness);
71
			}
72
		}
73
74
		logger.debug("Selecting {} individuals from a population of {}", numIndividuals, individuals.size());
75
76 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::numberObjectives → KILLED
		final int numberObjectives = tournamentNSGA2Selection.numberObjectives();
77
78 6 1. select : RemoveSwitch 1 (case value 2) → SURVIVED
2. select : removed call to net/bmahe/genetics4j/core/spec/Optimization::ordinal → SURVIVED
3. select : removed call to java/lang/MatchException::<init> → NO_COVERAGE
4. select : RemoveSwitch 0 (case value 1) → KILLED
5. select : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::optimization → KILLED
6. select : Changed switch default to be first case → KILLED
		final Comparator<T> dominance = switch (eaConfiguration.optimization()) {
79 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::dominance → KILLED
			case MAXIMIZE -> tournamentNSGA2Selection.dominance();
80 3 1. select : removed call to java/util/Comparator::reversed → NO_COVERAGE
2. select : replaced call to java/util/Comparator::reversed with receiver → NO_COVERAGE
3. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::dominance → NO_COVERAGE
			case MINIMIZE -> tournamentNSGA2Selection.dominance().reversed();
81
		};
82
83 6 1. select : RemoveSwitch 1 (case value 2) → SURVIVED
2. select : removed call to net/bmahe/genetics4j/core/spec/Optimization::ordinal → SURVIVED
3. select : removed call to java/lang/MatchException::<init> → NO_COVERAGE
4. select : RemoveSwitch 0 (case value 1) → KILLED
5. select : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::optimization → KILLED
6. select : Changed switch default to be first case → KILLED
		final Function<Integer, Comparator<T>> objectiveComparator = switch (eaConfiguration.optimization()) {
84 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::objectiveComparator → KILLED
			case MAXIMIZE -> tournamentNSGA2Selection.objectiveComparator();
85 6 1. lambda$select$0 : replaced call to java/util/Comparator::reversed with receiver → NO_COVERAGE
2. lambda$select$0 : removed call to java/util/function/Function::apply → NO_COVERAGE
3. lambda$select$0 : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::objectiveComparator → NO_COVERAGE
4. lambda$select$0 : replaced call to java/util/function/Function::apply with argument → NO_COVERAGE
5. lambda$select$0 : replaced return value with null for net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2Selector::lambda$select$0 → NO_COVERAGE
6. lambda$select$0 : removed call to java/util/Comparator::reversed → NO_COVERAGE
			case MINIMIZE -> (m) -> tournamentNSGA2Selection.objectiveComparator().apply(m).reversed();
86
		};
87
88 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::distance → KILLED
		final ObjectiveDistance<T> objectiveDistance = tournamentNSGA2Selection.distance();
89 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::numCandidates → KILLED
		final int numCandidates = tournamentNSGA2Selection.numCandidates();
90
91
		logger.debug("Ranking population");
92
		final List<Set<Integer>> rankedPopulation = ParetoUtils
93 3 1. select : removed call to net/bmahe/genetics4j/core/Population::getAllFitnesses → KILLED
2. select : replaced call to net/bmahe/genetics4j/moo/ParetoUtils::rankedPopulation with argument → KILLED
3. select : removed call to net/bmahe/genetics4j/moo/ParetoUtils::rankedPopulation → KILLED
				.rankedPopulation(dominance, individuals.getAllFitnesses());
94
		// Build a reverse index
95 1 1. select : removed call to net/bmahe/genetics4j/core/Population::size → KILLED
		final int[] individual2Rank = new int[individuals.size()];
96 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++) {
97 1 1. select : removed call to java/util/List::get → KILLED
			final Set<Integer> set = rankedPopulation.get(j);
98
99
			for (final Integer idx : set) {
100 1 1. select : removed call to java/lang/Integer::intValue → SURVIVED
				individual2Rank[idx] = j;
101
			}
102
		}
103
104
		if (logger.isTraceEnabled()) {
105
			logger.trace("Ranked population: {}", rankedPopulation);
106 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++) {
107 1 1. select : removed call to java/util/List::get → NO_COVERAGE
				final Set<Integer> subPopulationIdx = rankedPopulation.get(i);
108
				logger.trace("\tRank {}", i);
109
				for (final Integer index : subPopulationIdx) {
110
					logger.trace("\t\t{} - Fitness {}", index, individuals.getFitness(index));
111
				}
112
			}
113
		}
114
		logger.debug("Computing crowding distance assignment");
115 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/impl/NSGA2Utils::crowdingDistanceAssignment → KILLED
		final double[] crowdingDistanceAssignment = NSGA2Utils.crowdingDistanceAssignment(
116
				numberObjectives,
117 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getAllFitnesses → KILLED
					individuals.getAllFitnesses(),
118
					objectiveComparator,
119
					objectiveDistance);
120
121
		logger.debug("Performing tournaments");
122 1 1. select : removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED
		final Population<T> selectedIndividuals = new Population<>();
123 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 : removed conditional - replaced comparison check with false → KILLED
4. select : changed conditional boundary → KILLED
5. select : negated conditional → KILLED
		while (selectedIndividuals.size() < numIndividuals) {
124
125
			logger.trace("Performing tournament");
126
			Genotype bestCandidate = null;
127 1 1. select : Substituted -1 with 0 → SURVIVED
			int bestCandidateIndex = -1;
128
			T bestFitness = null;
129
130 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++) {
131 3 1. select : removed call to java/util/random/RandomGenerator::nextInt → SURVIVED
2. select : removed call to net/bmahe/genetics4j/core/Population::size → SURVIVED
3. select : replaced call to java/util/random/RandomGenerator::nextInt with argument → KILLED
				final int candidateIndex = randomGenerator.nextInt(individuals.size());
132
133
				logger.trace(
134
						"\tCandidate - index {} - rank {} - crowding distance {} - fitness {}",
135 1 1. select : removed call to java/lang/Integer::valueOf → SURVIVED
							candidateIndex,
136 1 1. select : removed call to java/lang/Integer::valueOf → SURVIVED
							individual2Rank[candidateIndex],
137 1 1. select : removed call to java/lang/Double::valueOf → SURVIVED
							crowdingDistanceAssignment[candidateIndex],
138 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getFitness → SURVIVED
							individuals.getFitness(candidateIndex));
139
140 14 1. select : removed conditional - replaced comparison check with true → SURVIVED
2. select : changed conditional boundary → SURVIVED
3. select : negated conditional → SURVIVED
4. select : negated conditional → SURVIVED
5. select : removed conditional - replaced equality check with false → SURVIVED
6. select : negated conditional → SURVIVED
7. select : removed conditional - replaced comparison check with true → SURVIVED
8. select : removed conditional - replaced equality check with true → SURVIVED
9. select : changed conditional boundary → SURVIVED
10. select : removed conditional - replaced comparison check with false → SURVIVED
11. select : removed conditional - replaced comparison check with false → SURVIVED
12. select : removed conditional - replaced equality check with false → SURVIVED
13. select : removed conditional - replaced equality check with true → KILLED
14. select : negated conditional → KILLED
				if (bestCandidate == null || individual2Rank[candidateIndex] < individual2Rank[bestCandidateIndex]
141
						|| (individual2Rank[candidateIndex] == individual2Rank[bestCandidateIndex]
142
								&& crowdingDistanceAssignment[candidateIndex] > crowdingDistanceAssignment[bestCandidateIndex])) {
143
144
					logger.trace("\t candidate win!");
145 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getGenotype → KILLED
					bestCandidate = individuals.getGenotype(candidateIndex);
146 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getFitness → KILLED
					bestFitness = individuals.getFitness(candidateIndex);
147
					bestCandidateIndex = candidateIndex;
148
				}
149
			}
150
151 1 1. select : removed call to net/bmahe/genetics4j/core/Population::add → TIMED_OUT
			selectedIndividuals.add(bestCandidate, bestFitness);
152
		}
153
154 1 1. select : replaced return value with null for net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2Selector::select → KILLED
		return selectedIndividuals;
155
	}
156
}

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()]
negated conditional → KILLED

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

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 call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::deduplicate → 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()]
removed conditional - replaced equality check with true → KILLED

53

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

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

54

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

56

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

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

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

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

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

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

57

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

58

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/Set::add → NO_COVERAGE

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

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

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

61

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

66

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 : 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 : 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

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 : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectorTest]/[method:simple()]
negated conditional → KILLED

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

67

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

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()]
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 net/bmahe/genetics4j/core/Population::add → KILLED

76

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

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()]
RemoveSwitch 0 (case value 1) → KILLED

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

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 : 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

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

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()]
Changed switch default to be first case → KILLED

79

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

80

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

3.3
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 : 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

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

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 : 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

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

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()]
Changed switch default to be first case → KILLED

84

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

85

1.1
Location : lambda$select$0
Killed by : none
replaced call to java/util/Comparator::reversed with receiver → 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
removed call to net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::objectiveComparator → NO_COVERAGE

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

5.5
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

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

88

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

89

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

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/core/Population::getAllFitnesses → 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

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/moo/ParetoUtils::rankedPopulation → KILLED

95

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

96

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

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 java/util/List::get → KILLED

100

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

106

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

107

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

115

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

117

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

122

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

123

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

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 : 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 : 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()]
negated conditional → KILLED

127

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

130

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 : 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()]
negated conditional → KILLED

131

1.1
Location : select
Killed by : none
removed call to java/util/random/RandomGenerator::nextInt → 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()]
replaced call to java/util/random/RandomGenerator::nextInt with argument → KILLED

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

135

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

136

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

137

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

138

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

140

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 conditional - replaced equality check with true → KILLED

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

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

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

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

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

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

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

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

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

11.11
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

12.12
Location : select
Killed by : none
removed conditional - replaced comparison 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 : none
removed conditional - replaced equality check with false → SURVIVED Covering tests

145

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

146

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

151

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

154

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