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

Mutations

33

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

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 tournamentNSGA2Selection → KILLED

49

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

50

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

51

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

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

52

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

53

1.1
Location : select
Killed by : none
removed call to java/util/Optional::get → 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 call to java/util/List::size → 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 conditional - replaced comparison check with false → 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
negated conditional → NO_COVERAGE

2.2
Location : select
Killed by : none
removed conditional - replaced equality check with true → 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 call to java/util/Set::add → 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()]
removed conditional - replaced comparison check with true → 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()]
negated conditional → 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

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 : none
removed call to java/lang/MatchException::<init> → NO_COVERAGE

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()]
Changed switch default to be first case → 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 : 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
RemoveSwitch 1 (case value 2) → SURVIVED Covering tests

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()]
RemoveSwitch 0 (case value 1) → 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 net/bmahe/genetics4j/moo/nsga2/spec/TournamentNSGA2Selection::dominance → NO_COVERAGE

81

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

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()]
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 : 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

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

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

85

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

86

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

87

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

88

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

91

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

92

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

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

96

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

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::size → KILLED

99

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

2.2
Location : select
Killed by : none
removed call to java/util/List::size → 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 conditional - replaced comparison check with true → 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()]
changed conditional boundary → 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

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

103

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

109

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
negated conditional → NO_COVERAGE

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

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

110

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

118

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

119

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

124

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

125

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()]
changed conditional boundary → 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()]
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

129

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

132

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
removed conditional - replaced comparison check with true → TIMED_OUT

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
Substituted 0 with 1 → SURVIVED Covering tests

133

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 : 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 java/util/random/RandomGenerator::nextInt → 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/Integer::valueOf → SURVIVED
Covering tests

138

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

139

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

141

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

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

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

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

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

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

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

8.8
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

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

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

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

12.12
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

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

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

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::getGenotype → KILLED

147

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

152

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

155

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.19.6