DoubleTournamentSelector.java

1
package net.bmahe.genetics4j.core.selection;
2
3
import java.util.ArrayList;
4
import java.util.Comparator;
5
import java.util.List;
6
import java.util.random.RandomGenerator;
7
import java.util.stream.IntStream;
8
9
import org.apache.commons.lang3.Validate;
10
import org.apache.logging.log4j.LogManager;
11
import org.apache.logging.log4j.Logger;
12
13
import net.bmahe.genetics4j.core.Genotype;
14
import net.bmahe.genetics4j.core.Individual;
15
import net.bmahe.genetics4j.core.Population;
16
import net.bmahe.genetics4j.core.spec.AbstractEAConfiguration;
17
import net.bmahe.genetics4j.core.spec.selection.DoubleTournament;
18
import net.bmahe.genetics4j.core.spec.selection.SelectionPolicy;
19
import net.bmahe.genetics4j.core.spec.selection.Tournament;
20
import net.bmahe.genetics4j.core.util.IndividualUtils;
21
22
public class DoubleTournamentSelector<T extends Comparable<T>> implements Selector<T> {
23
	final static public Logger logger = LogManager.getLogger(DoubleTournamentSelector.class);
24
25
	private final SelectionPolicy selectionPolicy;
26
	private final RandomGenerator randomGenerator;
27
28
	public DoubleTournamentSelector(final SelectionPolicy _selectionPolicy, final RandomGenerator _randomGenerator) {
29
		Validate.notNull(_selectionPolicy);
30
		Validate.isInstanceOf(DoubleTournament.class, _selectionPolicy);
31
		Validate.notNull(_randomGenerator);
32
33 1 1. <init> : Removed assignment to member variable selectionPolicy → KILLED
		this.selectionPolicy = _selectionPolicy;
34 1 1. <init> : Removed assignment to member variable randomGenerator → KILLED
		this.randomGenerator = _randomGenerator;
35
	}
36
37
	protected Individual<T> randomIndividual(final List<Genotype> population, final List<T> fitnessScore) {
38
		Validate.notNull(population);
39
		Validate.notNull(fitnessScore);
40
		Validate.isTrue(fitnessScore.size() > 0);
41
		Validate.isTrue(population.size() == fitnessScore.size());
42
43 3 1. randomIndividual : removed call to java/util/List::size → SURVIVED
2. randomIndividual : removed call to java/util/random/RandomGenerator::nextInt → KILLED
3. randomIndividual : replaced call to java/util/random/RandomGenerator::nextInt with argument → KILLED
		final int candidateIndex = randomGenerator.nextInt(fitnessScore.size());
44 4 1. randomIndividual : replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::randomIndividual → KILLED
2. randomIndividual : removed call to net/bmahe/genetics4j/core/Individual::of → KILLED
3. randomIndividual : removed call to java/util/List::get → KILLED
4. randomIndividual : removed call to java/util/List::get → KILLED
		return Individual.of(population.get(candidateIndex), fitnessScore.get(candidateIndex));
45
46
	}
47
48
	protected Individual<T> selectForFitness(final AbstractEAConfiguration<T> eaConfiguration,
49
			final Comparator<Individual<T>> fitnessComparator, final int numCandidates, final List<Genotype> population,
50
			final List<T> fitnessScore) {
51
		Validate.notNull(population);
52
		Validate.notNull(fitnessScore);
53
		Validate.isTrue(fitnessScore.isEmpty() == false);
54
55 3 1. selectForFitness : replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::selectForFitness → KILLED
2. selectForFitness : Substituted 0 with 1 → KILLED
3. selectForFitness : removed call to java/util/stream/IntStream::range → KILLED
		return IntStream.range(0, numCandidates)
56 1 1. selectForFitness : removed call to java/util/stream/IntStream::boxed → KILLED
				.boxed()
57 4 1. selectForFitness : removed call to java/util/stream/Stream::map → KILLED
2. selectForFitness : replaced call to java/util/stream/Stream::map with receiver → KILLED
3. lambda$selectForFitness$0 : replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::lambda$selectForFitness$0 → KILLED
4. lambda$selectForFitness$0 : removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::randomIndividual → KILLED
				.map(i -> randomIndividual(population, fitnessScore))
58 3 1. lambda$selectForFitness$1 : replaced int return with 0 for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::lambda$selectForFitness$1 → KILLED
2. lambda$selectForFitness$1 : removed call to java/util/Comparator::compare → KILLED
3. selectForFitness : removed call to java/util/stream/Stream::max → KILLED
				.max((a, b) -> fitnessComparator.compare(a, b))
59 1 1. selectForFitness : removed call to java/util/Optional::get → KILLED
				.get();
60
61
	}
62
63
	protected Individual<T> parsimonyPick(final Comparator<Individual<T>> parsimonyComparator,
64
			final double parsimonyTournamentSize, final Individual<T> first, final Individual<T> second) {
65
		Validate.notNull(parsimonyComparator);
66
		Validate.inclusiveBetween(0.0, 2.0, parsimonyTournamentSize);
67
		Validate.notNull(first);
68
		Validate.notNull(second);
69
70 1 1. parsimonyPick : removed call to java/util/Comparator::compare → KILLED
		final int parsimonyCompared = parsimonyComparator.compare(first, second);
71
72
		Individual<T> selected = first;
73 7 1. parsimonyPick : Substituted 2.0 with 1.0 → SURVIVED
2. parsimonyPick : changed conditional boundary → SURVIVED
3. parsimonyPick : Replaced double division with multiplication → SURVIVED
4. parsimonyPick : removed conditional - replaced comparison check with true → SURVIVED
5. parsimonyPick : removed call to java/util/random/RandomGenerator::nextDouble → SURVIVED
6. parsimonyPick : negated conditional → KILLED
7. parsimonyPick : removed conditional - replaced comparison check with false → KILLED
		if (randomGenerator.nextDouble() < parsimonyTournamentSize / 2.0) {
74 4 1. parsimonyPick : changed conditional boundary → SURVIVED
2. parsimonyPick : negated conditional → KILLED
3. parsimonyPick : removed conditional - replaced comparison check with false → KILLED
4. parsimonyPick : removed conditional - replaced comparison check with true → KILLED
			if (parsimonyCompared > 0) {
75
				selected = second;
76
			}
77
		} else {
78 4 1. parsimonyPick : removed conditional - replaced comparison check with true → NO_COVERAGE
2. parsimonyPick : removed conditional - replaced comparison check with false → NO_COVERAGE
3. parsimonyPick : changed conditional boundary → NO_COVERAGE
4. parsimonyPick : negated conditional → NO_COVERAGE
			if (parsimonyCompared < 0) {
79
				selected = second;
80
			}
81
		}
82
83 1 1. parsimonyPick : replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick → KILLED
		return selected;
84
	}
85
86
	@Override
87
	public Population<T> select(final AbstractEAConfiguration<T> eaConfiguration, final int numIndividuals,
88
			final List<Genotype> population, final List<T> fitnessScore) {
89
		Validate.notNull(eaConfiguration);
90
		Validate.notNull(population);
91
		Validate.notNull(fitnessScore);
92
		Validate.isTrue(numIndividuals > 0);
93
		Validate.isTrue(population.size() == fitnessScore.size());
94
95
		@SuppressWarnings("unchecked")
96
		final DoubleTournament<T> doubleTournament = (DoubleTournament<T>) selectionPolicy;
97 1 1. select : removed call to net/bmahe/genetics4j/core/spec/selection/DoubleTournament::doFitnessFirst → KILLED
		final boolean doFitnessFirst = doubleTournament.doFitnessFirst();
98 1 1. select : removed call to net/bmahe/genetics4j/core/spec/selection/DoubleTournament::fitnessTournament → KILLED
		final Tournament<T> fitnessTournament = doubleTournament.fitnessTournament();
99 1 1. select : removed call to net/bmahe/genetics4j/core/spec/selection/DoubleTournament::parsimonyComparator → KILLED
		final Comparator<Individual<T>> parsimonyComparator = doubleTournament.parsimonyComparator();
100 1 1. select : removed call to net/bmahe/genetics4j/core/spec/selection/DoubleTournament::parsimonyTournamentSize → KILLED
		final double parsimonyTournamentSize = doubleTournament.parsimonyTournamentSize();
101
102
		Validate.isTrue((doFitnessFirst && parsimonyTournamentSize <= 2.0 && parsimonyTournamentSize >= 0.0)
103
				|| doFitnessFirst == false);
104
105 1 1. select : removed call to net/bmahe/genetics4j/core/util/IndividualUtils::fitnessBasedComparator → KILLED
		final Comparator<Individual<T>> fitnessComparator = IndividualUtils.fitnessBasedComparator(eaConfiguration);
106
107
		logger.debug("Selecting {} individuals", numIndividuals);
108
109 1 1. select : removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED
		final Population<T> selectedIndividuals = new Population<>();
110
111 5 1. select : removed call to net/bmahe/genetics4j/core/Population::size → TIMED_OUT
2. select : removed conditional - replaced comparison check with true → TIMED_OUT
3. select : removed conditional - replaced comparison check with false → KILLED
4. select : negated conditional → KILLED
5. select : changed conditional boundary → KILLED
		while (selectedIndividuals.size() < numIndividuals) {
112
113 3 1. select : removed conditional - replaced equality check with false → KILLED
2. select : removed conditional - replaced equality check with true → KILLED
3. select : negated conditional → KILLED
			if (doFitnessFirst) {
114 1 1. select : removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::selectForFitness → KILLED
				final Individual<T> first = selectForFitness(eaConfiguration,
115
						fitnessComparator,
116 1 1. select : removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::numCandidates → KILLED
						fitnessTournament.numCandidates(),
117
						population,
118
						fitnessScore);
119 1 1. select : removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::selectForFitness → KILLED
				final Individual<T> second = selectForFitness(eaConfiguration,
120
						fitnessComparator,
121 1 1. select : removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::numCandidates → KILLED
						fitnessTournament.numCandidates(),
122
						population,
123
						fitnessScore);
124
125 2 1. select : replaced call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick with argument → KILLED
2. select : removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick → KILLED
				final Individual<T> selected = parsimonyPick(parsimonyComparator, parsimonyTournamentSize, first, second);
126
127 3 1. select : removed call to net/bmahe/genetics4j/core/Population::add → TIMED_OUT
2. select : removed call to net/bmahe/genetics4j/core/Individual::fitness → KILLED
3. select : removed call to net/bmahe/genetics4j/core/Individual::genotype → KILLED
				selectedIndividuals.add(selected.genotype(), selected.fitness());
128
			} else {
129
130 1 1. select : removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::numCandidates → KILLED
				final int numberCandidatesFitness = fitnessTournament.numCandidates();
131 1 1. select : removed call to java/util/ArrayList::<init> → KILLED
				final List<Individual<T>> candidatesFitness = new ArrayList<>(numberCandidatesFitness);
132
133 5 1. select : removed conditional - replaced comparison check with true → TIMED_OUT
2. select : removed conditional - replaced comparison check with false → KILLED
3. select : changed conditional boundary → KILLED
4. select : negated conditional → KILLED
5. select : Substituted 0 with 1 → KILLED
				for (int i = 0; i < numberCandidatesFitness; i++) {
134 1 1. select : removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::randomIndividual → KILLED
					final Individual<T> first = randomIndividual(population, fitnessScore);
135 1 1. select : removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::randomIndividual → KILLED
					final Individual<T> second = randomIndividual(population, fitnessScore);
136
137 2 1. select : removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick → KILLED
2. select : replaced call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick with argument → KILLED
					final Individual<T> selected = parsimonyPick(parsimonyComparator,
138
							parsimonyTournamentSize,
139
							first,
140
							second);
141
142 1 1. select : removed call to java/util/List::add → KILLED
					candidatesFitness.add(selected);
143
				}
144
145 1 1. select : removed call to java/util/List::stream → KILLED
				final Individual<T> selected = candidatesFitness.stream()
146 3 1. lambda$select$2 : replaced int return with 0 for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::lambda$select$2 → KILLED
2. lambda$select$2 : removed call to java/util/Comparator::compare → KILLED
3. select : removed call to java/util/stream/Stream::max → KILLED
						.max((a, b) -> fitnessComparator.compare(a, b))
147 1 1. select : removed call to java/util/Optional::get → KILLED
						.get();
148
149 3 1. select : removed call to net/bmahe/genetics4j/core/Population::add → TIMED_OUT
2. select : removed call to net/bmahe/genetics4j/core/Individual::fitness → KILLED
3. select : removed call to net/bmahe/genetics4j/core/Individual::genotype → KILLED
				selectedIndividuals.add(selected.genotype(), selected.fitness());
150
			}
151
152
		}
153
154 1 1. select : replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::select → KILLED
		return selectedIndividuals;
155
	}
156
}

Mutations

33

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
Removed assignment to member variable selectionPolicy → KILLED

34

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
Removed assignment to member variable randomGenerator → KILLED

43

1.1
Location : randomIndividual
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/random/RandomGenerator::nextInt → KILLED

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

3.3
Location : randomIndividual
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
replaced call to java/util/random/RandomGenerator::nextInt with argument → KILLED

44

1.1
Location : randomIndividual
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::randomIndividual → KILLED

2.2
Location : randomIndividual
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/Individual::of → KILLED

3.3
Location : randomIndividual
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/List::get → KILLED

4.4
Location : randomIndividual
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/List::get → KILLED

55

1.1
Location : selectForFitness
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::selectForFitness → KILLED

2.2
Location : selectForFitness
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
Substituted 0 with 1 → KILLED

3.3
Location : selectForFitness
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/stream/IntStream::range → KILLED

56

1.1
Location : selectForFitness
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/stream/IntStream::boxed → KILLED

57

1.1
Location : selectForFitness
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/stream/Stream::map → KILLED

2.2
Location : selectForFitness
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
replaced call to java/util/stream/Stream::map with receiver → KILLED

3.3
Location : lambda$selectForFitness$0
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::lambda$selectForFitness$0 → KILLED

4.4
Location : lambda$selectForFitness$0
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::randomIndividual → KILLED

58

1.1
Location : lambda$selectForFitness$1
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
replaced int return with 0 for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::lambda$selectForFitness$1 → KILLED

2.2
Location : lambda$selectForFitness$1
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/Comparator::compare → KILLED

3.3
Location : selectForFitness
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/stream/Stream::max → KILLED

59

1.1
Location : selectForFitness
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/Optional::get → KILLED

70

1.1
Location : parsimonyPick
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to java/util/Comparator::compare → KILLED

73

1.1
Location : parsimonyPick
Killed by : none
Substituted 2.0 with 1.0 → SURVIVED
Covering tests

2.2
Location : parsimonyPick
Killed by : none
changed conditional boundary → SURVIVED Covering tests

3.3
Location : parsimonyPick
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
negated conditional → KILLED

4.4
Location : parsimonyPick
Killed by : none
Replaced double division with multiplication → SURVIVED Covering tests

5.5
Location : parsimonyPick
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed conditional - replaced comparison check with false → KILLED

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

7.7
Location : parsimonyPick
Killed by : none
removed call to java/util/random/RandomGenerator::nextDouble → SURVIVED Covering tests

74

1.1
Location : parsimonyPick
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
negated conditional → KILLED

2.2
Location : parsimonyPick
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

3.3
Location : parsimonyPick
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed conditional - replaced comparison check with false → KILLED

4.4
Location : parsimonyPick
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed conditional - replaced comparison check with true → KILLED

78

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

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

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

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

83

1.1
Location : parsimonyPick
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick → KILLED

97

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/spec/selection/DoubleTournament::doFitnessFirst → KILLED

98

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/spec/selection/DoubleTournament::fitnessTournament → KILLED

99

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/spec/selection/DoubleTournament::parsimonyComparator → KILLED

100

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/spec/selection/DoubleTournament::parsimonyTournamentSize → KILLED

105

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/util/IndividualUtils::fitnessBasedComparator → KILLED

109

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED

111

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed conditional - replaced comparison check with false → KILLED

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

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

4.4
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
negated conditional → KILLED

5.5
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
changed conditional boundary → KILLED

113

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed conditional - replaced equality check with false → KILLED

2.2
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed conditional - replaced equality check with true → KILLED

3.3
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
negated conditional → KILLED

114

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::selectForFitness → KILLED

116

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::numCandidates → KILLED

119

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::selectForFitness → KILLED

121

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::numCandidates → KILLED

125

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
replaced call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick with argument → KILLED

2.2
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick → KILLED

127

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/Individual::fitness → KILLED

2.2
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
removed call to net/bmahe/genetics4j/core/Individual::genotype → KILLED

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

130

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::numCandidates → KILLED

131

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to java/util/ArrayList::<init> → KILLED

133

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed conditional - replaced comparison check with false → KILLED

2.2
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
changed conditional boundary → 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.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
negated conditional → KILLED

5.5
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
Substituted 0 with 1 → KILLED

134

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::randomIndividual → KILLED

135

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::randomIndividual → KILLED

137

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick → KILLED

2.2
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
replaced call to net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::parsimonyPick with argument → KILLED

142

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to java/util/List::add → KILLED

145

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to java/util/List::stream → KILLED

146

1.1
Location : lambda$select$2
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
replaced int return with 0 for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::lambda$select$2 → KILLED

2.2
Location : lambda$select$2
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to java/util/Comparator::compare → KILLED

3.3
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to java/util/stream/Stream::max → KILLED

147

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to java/util/Optional::get → KILLED

149

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to net/bmahe/genetics4j/core/Individual::fitness → KILLED

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

3.3
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to net/bmahe/genetics4j/core/Individual::genotype → KILLED

154

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
replaced return value with null for net/bmahe/genetics4j/core/selection/DoubleTournamentSelector::select → KILLED

Active mutators

Tests examined


Report generated by PIT 1.19.6