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

Mutations

32

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

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

48

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 conditional - replaced equality check with true → 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()]
negated conditional → 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/moo/nsga2/spec/NSGA2Selection::deduplicate → KILLED

49

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

2.2
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
removed conditional - replaced comparison check with false → NO_COVERAGE

2.2
Location : select
Killed by : none
removed call to java/util/List::size → 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
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 false → 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 call to java/util/Set::add → 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()]
removed call to java/util/List::size → 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 : none
Substituted 0 with 1 → 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()]
changed conditional boundary → 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 true → 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()]
negated conditional → KILLED

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

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

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

5.5
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.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

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()]
removed call to net/bmahe/genetics4j/core/spec/Optimization::ordinal → 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
replaced call to java/util/Comparator::reversed with receiver → NO_COVERAGE

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

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

79

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

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

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

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

5.5
Location : select
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.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

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

80

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

81

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 return value with null for net/bmahe/genetics4j/moo/nsga2/impl/NSGA2Selector::lambda$select$0 → NO_COVERAGE

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

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

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

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

84

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

88

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()]
removed call to net/bmahe/genetics4j/core/Population::getAllFitnesses → 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()]
replaced call to net/bmahe/genetics4j/moo/ParetoUtils::rankedPopulation with argument → KILLED

91

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

93

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

98

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

99

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

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 conditional - replaced comparison check with false → 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()]
negated conditional → 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 java/util/List::size → KILLED

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

10.10
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

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()]
removed call to java/util/List::get → 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 call to java/util/Set::size → KILLED

4.4
Location : select
Killed by : none
changed conditional boundary → 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
removed conditional - replaced comparison check with true → 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

106

1.1
Location : select
Killed by : none
Replaced integer subtraction with addition → 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
changed conditional boundary → SURVIVED Covering tests

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

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

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

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

108

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

109

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
replaced call to java/util/stream/Stream::sorted with receiver → NO_COVERAGE

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

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

5.5
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

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

110

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

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

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

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

111

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

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

119

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

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

120

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

121

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

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

124

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::getGenotype → 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 java/lang/Integer::intValue → 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 net/bmahe/genetics4j/core/Population::getFitness → KILLED

4.4
Location : select
Killed by : none
removed call to java/lang/Integer::intValue → 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()]
removed call to net/bmahe/genetics4j/core/Population::add → KILLED

128

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

131

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