NSGA2Selector.java

1
package net.bmahe.genetics4j.moo.nsga2.impl;
2
3
import java.util.Collection;
4
import java.util.Comparator;
5
import java.util.List;
6
import java.util.Set;
7
import java.util.TreeSet;
8
import java.util.function.Function;
9
import java.util.stream.Collectors;
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.NSGA2Selection;
22
23
public class NSGA2Selector<T extends Comparable<T>> implements Selector<T> {
24
	final static public Logger logger = LogManager.getLogger(NSGA2Selector.class);
25
26
	private final NSGA2Selection<T> nsga2Selection;
27
28
	public NSGA2Selector(final NSGA2Selection<T> _nsga2Selection) {
29
		Validate.notNull(_nsga2Selection);
30
31 1 1. <init> : Removed assignment to member variable nsga2Selection → KILLED
		this.nsga2Selection = _nsga2Selection;
32
	}
33
34
	@Override
35
	public Population<T> select(final AbstractEAConfiguration<T> eaConfiguration, final int numIndividuals,
36
			final List<Genotype> population, final List<T> fitnessScore) {
37
		Validate.notNull(eaConfiguration);
38
		Validate.notNull(population);
39
		Validate.notNull(fitnessScore);
40
		Validate.isTrue(numIndividuals > 0);
41
		Validate.isTrue(population.size() == fitnessScore.size());
42
43
		logger.debug("Incoming population size is {}", population.size());
44
45 1 1. select : removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED
		final Population<T> individuals = new Population<>();
46 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/NSGA2Selection::deduplicate → KILLED
		if (nsga2Selection.deduplicate()
47 4 1. select : removed conditional - replaced equality check with false → SURVIVED
2. select : removed call to java/util/Optional::isPresent → SURVIVED
3. select : negated conditional → KILLED
4. select : removed conditional - replaced equality check with true → KILLED
				.isPresent()) {
48 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/NSGA2Selection::deduplicate → NO_COVERAGE
			final Comparator<Genotype> individualDeduplicator = nsga2Selection.deduplicate()
49 1 1. select : removed call to java/util/Optional::get → NO_COVERAGE
					.get();
50 1 1. select : removed call to java/util/TreeSet::<init> → NO_COVERAGE
			final Set<Genotype> seenGenotype = new TreeSet<>(individualDeduplicator);
51
52 6 1. select : changed conditional boundary → NO_COVERAGE
2. select : removed conditional - replaced comparison check with false → NO_COVERAGE
3. select : removed call to java/util/List::size → NO_COVERAGE
4. select : negated conditional → NO_COVERAGE
5. select : removed conditional - replaced comparison check with true → NO_COVERAGE
6. select : Substituted 0 with 1 → NO_COVERAGE
			for (int i = 0; i < population.size(); i++) {
53 1 1. select : removed call to java/util/List::get → NO_COVERAGE
				final Genotype genotype = population.get(i);
54 1 1. select : removed call to java/util/List::get → NO_COVERAGE
				final T fitness = fitnessScore.get(i);
55
56 4 1. select : removed conditional - replaced equality check with true → NO_COVERAGE
2. select : removed call to java/util/Set::add → NO_COVERAGE
3. select : removed conditional - replaced equality check with false → NO_COVERAGE
4. select : negated conditional → NO_COVERAGE
				if (seenGenotype.add(genotype)) {
57 1 1. select : removed call to net/bmahe/genetics4j/core/Population::add → NO_COVERAGE
					individuals.add(genotype, fitness);
58
				}
59
			}
60
61
		} else {
62 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 conditional - replaced comparison check with true → KILLED
5. select : removed call to java/util/List::size → KILLED
6. select : negated conditional → KILLED
			for (int i = 0; i < population.size(); i++) {
63 1 1. select : removed call to java/util/List::get → KILLED
				final Genotype genotype = population.get(i);
64 1 1. select : removed call to java/util/List::get → KILLED
				final T fitness = fitnessScore.get(i);
65
66 1 1. select : removed call to net/bmahe/genetics4j/core/Population::add → KILLED
				individuals.add(genotype, fitness);
67
			}
68
		}
69
70
		logger.debug("Selecting {} individuals from a population of {}", numIndividuals, individuals.size());
71
72 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/NSGA2Selection::numberObjectives → KILLED
		final int numberObjectives = nsga2Selection.numberObjectives();
73
74 6 1. select : removed call to java/lang/MatchException::<init> → NO_COVERAGE
2. select : RemoveSwitch 1 (case value 2) → SURVIVED
3. select : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::optimization → KILLED
4. select : removed call to net/bmahe/genetics4j/core/spec/Optimization::ordinal → KILLED
5. select : Changed switch default to be first case → KILLED
6. select : RemoveSwitch 0 (case value 1) → KILLED
		final Comparator<T> dominance = switch (eaConfiguration.optimization()) {
75 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/NSGA2Selection::dominance → KILLED
			case MAXIMIZE -> nsga2Selection.dominance();
76 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/NSGA2Selection::dominance → NO_COVERAGE
			case MINIMIZE -> nsga2Selection.dominance()
77 2 1. select : replaced call to java/util/Comparator::reversed with receiver → NO_COVERAGE
2. select : removed call to java/util/Comparator::reversed → NO_COVERAGE
					.reversed();
78
		};
79
80 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 : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::optimization → KILLED
5. select : RemoveSwitch 0 (case value 1) → KILLED
6. select : Changed switch default to be first case → KILLED
		final Function<Integer, Comparator<T>> objectiveComparator = switch (eaConfiguration.optimization()) {
81 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/NSGA2Selection::objectiveComparator → KILLED
			case MAXIMIZE -> nsga2Selection.objectiveComparator();
82 1 1. lambda$select$0 : removed call to net/bmahe/genetics4j/moo/nsga2/spec/NSGA2Selection::objectiveComparator → NO_COVERAGE
			case MINIMIZE -> (m) -> nsga2Selection.objectiveComparator()
83 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/NSGA2Selector::lambda$select$0 → NO_COVERAGE
					.apply(m)
84 2 1. lambda$select$0 : replaced call to java/util/Comparator::reversed with receiver → NO_COVERAGE
2. lambda$select$0 : removed call to java/util/Comparator::reversed → NO_COVERAGE
					.reversed();
85
		};
86
87 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/spec/NSGA2Selection::distance → KILLED
		final ObjectiveDistance<T> objectiveDistance = nsga2Selection.distance();
88
89
		logger.debug("Ranking population");
90 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,
91 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getAllFitnesses → KILLED
				individuals.getAllFitnesses());
92
93
		logger.debug("Computing crowding distance assignment");
94 1 1. select : removed call to net/bmahe/genetics4j/moo/nsga2/impl/NSGA2Utils::crowdingDistanceAssignment → SURVIVED
		double[] crowdingDistanceAssignment = NSGA2Utils.crowdingDistanceAssignment(numberObjectives,
95 1 1. select : removed call to net/bmahe/genetics4j/core/Population::getAllFitnesses → KILLED
				individuals.getAllFitnesses(),
96
				objectiveComparator,
97
				objectiveDistance);
98
99
		logger.debug("Selecting individuals");
100 1 1. select : removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED
		final Population<T> selectedIndividuals = new Population<>();
101 1 1. select : Substituted 0 with 1 → KILLED
		int currentFrontIndex = 0;
102 10 1. select : changed conditional boundary → SURVIVED
2. select : removed conditional - replaced comparison check with true → SURVIVED
3. select : changed conditional boundary → SURVIVED
4. select : removed conditional - replaced comparison check with true → SURVIVED
5. select : removed call to net/bmahe/genetics4j/core/Population::size → SURVIVED
6. select : removed conditional - replaced comparison check with false → KILLED
7. select : removed call to java/util/List::size → KILLED
8. select : negated conditional → KILLED
9. select : removed conditional - replaced comparison check with false → KILLED
10. select : negated conditional → KILLED
		while (selectedIndividuals.size() < numIndividuals && currentFrontIndex < rankedPopulation.size()
103 1 1. select : removed call to java/util/List::get → KILLED
				&& rankedPopulation.get(currentFrontIndex)
104 5 1. select : removed conditional - replaced comparison check with true → SURVIVED
2. select : changed conditional boundary → SURVIVED
3. select : negated conditional → KILLED
4. select : removed call to java/util/Set::size → KILLED
5. select : removed conditional - replaced comparison check with false → KILLED
						.size() > 0) {
105
106 1 1. select : removed call to java/util/List::get → KILLED
			final Set<Integer> currentFront = rankedPopulation.get(currentFrontIndex);
107
108
			Collection<Integer> bestIndividuals = currentFront;
109 7 1. select : removed conditional - replaced comparison check with false → SURVIVED
2. select : removed call to java/util/Set::size → SURVIVED
3. select : removed call to net/bmahe/genetics4j/core/Population::size → SURVIVED
4. select : removed conditional - replaced comparison check with true → SURVIVED
5. select : changed conditional boundary → SURVIVED
6. select : negated conditional → SURVIVED
7. select : Replaced integer subtraction with addition → SURVIVED
			if (currentFront.size() > numIndividuals - selectedIndividuals.size()) {
110
111 1 1. select : removed call to java/util/Set::stream → NO_COVERAGE
				bestIndividuals = currentFront.stream()
112 6 1. lambda$select$1 : removed call to java/lang/Double::compare → NO_COVERAGE
2. select : removed call to java/util/stream/Stream::sorted → NO_COVERAGE
3. lambda$select$1 : removed call to java/lang/Integer::intValue → NO_COVERAGE
4. lambda$select$1 : replaced int return with 0 for net/bmahe/genetics4j/moo/nsga2/impl/NSGA2Selector::lambda$select$1 → NO_COVERAGE
5. lambda$select$1 : removed call to java/lang/Integer::intValue → NO_COVERAGE
6. select : replaced call to java/util/stream/Stream::sorted with receiver → NO_COVERAGE
						.sorted((a, b) -> Double.compare(crowdingDistanceAssignment[b], crowdingDistanceAssignment[a]))
113 4 1. select : removed call to java/util/stream/Stream::limit → NO_COVERAGE
2. select : Replaced integer subtraction with addition → NO_COVERAGE
3. select : removed call to net/bmahe/genetics4j/core/Population::size → NO_COVERAGE
4. select : replaced call to java/util/stream/Stream::limit with receiver → NO_COVERAGE
						.limit(numIndividuals - selectedIndividuals.size())
114 2 1. select : removed call to java/util/stream/Stream::collect → NO_COVERAGE
2. select : removed call to java/util/stream/Collectors::toList → NO_COVERAGE
						.collect(Collectors.toList());
115
			}
116
117
			for (final Integer individualIndex : bestIndividuals) {
118
				if (logger.isTraceEnabled()) {
119
					logger.trace("Adding individual with index {}, fitness {}, rank {}, crowding distance {}",
120
							individualIndex,
121 2 1. select : removed call to net/bmahe/genetics4j/core/Population::getFitness → NO_COVERAGE
2. select : removed call to java/lang/Integer::intValue → NO_COVERAGE
							individuals.getFitness(individualIndex),
122 1 1. select : removed call to java/lang/Integer::valueOf → NO_COVERAGE
							currentFrontIndex,
123 2 1. select : removed call to java/lang/Double::valueOf → NO_COVERAGE
2. select : removed call to java/lang/Integer::intValue → NO_COVERAGE
							crowdingDistanceAssignment[individualIndex]);
124
				}
125
126 5 1. select : removed call to java/lang/Integer::intValue → SURVIVED
2. select : removed call to java/lang/Integer::intValue → KILLED
3. select : removed call to net/bmahe/genetics4j/core/Population::getGenotype → KILLED
4. select : removed call to net/bmahe/genetics4j/core/Population::add → KILLED
5. select : removed call to net/bmahe/genetics4j/core/Population::getFitness → KILLED
				selectedIndividuals.add(individuals.getGenotype(individualIndex), individuals.getFitness(individualIndex));
127
			}
128
129
			logger.trace("Selected {} individuals from rank {}", bestIndividuals.size(), currentFrontIndex);
130 2 1. select : Removed increment 1 → KILLED
2. select : Changed increment from 1 to -1 → KILLED
			currentFrontIndex++;
131
		}
132
133 1 1. select : replaced return value with null for net/bmahe/genetics4j/moo/nsga2/impl/NSGA2Selector::select → KILLED
		return selectedIndividuals;
134
	}
135
}

Mutations

31

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

45

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

46

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

47

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

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

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

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

48

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

49

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

50

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

52

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

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

3.3
Location : select
Killed by : none
removed call to java/util/List::size → 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
Substituted 0 with 1 → NO_COVERAGE

53

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

54

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

56

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

2.2
Location : select
Killed by : none
removed call to java/util/Set::add → 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
negated conditional → NO_COVERAGE

57

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

62

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

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

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

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

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

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

63

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

64

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

66

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

72

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

74

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

2.2
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/spec/Optimization::ordinal → KILLED

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

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

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.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
RemoveSwitch 0 (case value 1) → KILLED

75

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

76

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

77

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

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

80

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.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::optimization → 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.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
RemoveSwitch 0 (case value 1) → KILLED

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

81

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

82

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

83

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/NSGA2Selector::lambda$select$0 → NO_COVERAGE

84

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/Comparator::reversed → NO_COVERAGE

87

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

90

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

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

91

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

94

1.1
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/moo/nsga2/impl/NSGA2Utils::crowdingDistanceAssignment → SURVIVED
Covering tests

95

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

101

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
Substituted 0 with 1 → KILLED

102

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.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
removed conditional - replaced comparison check with false → KILLED

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

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

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

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

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

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

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

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

103

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

104

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
negated conditional → 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 : net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
removed call to java/util/Set::size → KILLED

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

106

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

109

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

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

3.3
Location : select
Killed by : none
removed call to net/bmahe/genetics4j/core/Population::size → 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
negated conditional → SURVIVED Covering tests

7.7
Location : select
Killed by : none
Replaced integer subtraction with addition → SURVIVED Covering tests

111

1.1
Location : select
Killed by : none
removed call to java/util/Set::stream → NO_COVERAGE

112

1.1
Location : lambda$select$1
Killed by : none
removed call to java/lang/Double::compare → NO_COVERAGE

2.2
Location : select
Killed by : none
removed call to java/util/stream/Stream::sorted → NO_COVERAGE

3.3
Location : lambda$select$1
Killed by : none
removed call to java/lang/Integer::intValue → NO_COVERAGE

4.4
Location : lambda$select$1
Killed by : none
replaced int return with 0 for net/bmahe/genetics4j/moo/nsga2/impl/NSGA2Selector::lambda$select$1 → NO_COVERAGE

5.5
Location : lambda$select$1
Killed by : none
removed call to java/lang/Integer::intValue → NO_COVERAGE

6.6
Location : select
Killed by : none
replaced call to java/util/stream/Stream::sorted with receiver → NO_COVERAGE

113

1.1
Location : select
Killed by : none
removed call to java/util/stream/Stream::limit → NO_COVERAGE

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

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

4.4
Location : select
Killed by : none
replaced call to java/util/stream/Stream::limit with receiver → NO_COVERAGE

114

1.1
Location : select
Killed by : none
removed call to java/util/stream/Stream::collect → NO_COVERAGE

2.2
Location : select
Killed by : none
removed call to java/util/stream/Collectors::toList → NO_COVERAGE

121

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

2.2
Location : select
Killed by : none
removed call to java/lang/Integer::intValue → NO_COVERAGE

122

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

123

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

2.2
Location : select
Killed by : none
removed call to java/lang/Integer::intValue → NO_COVERAGE

126

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
removed call to java/lang/Integer::intValue → KILLED

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

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

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

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

130

1.1
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
Removed increment 1 → KILLED

2.2
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.NSGA2SelectorTest]/[method:simple()]
Changed increment from 1 to -1 → KILLED

133

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

Active mutators

Tests examined


Report generated by PIT 1.19.6