DoubleTournamentSelector.java

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

Mutations

35

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

36

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

45

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

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

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

46

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

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

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

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

57

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

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

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

58

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

59

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

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

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

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

60

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

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

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

61

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

72

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

75

1.1
Location : parsimonyPick
Killed by : none
removed conditional - replaced comparison check with true → 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.gp.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximize()]
negated conditional → KILLED

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

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

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

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

76

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

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

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

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

80

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

85

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

100

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

101

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

102

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

103

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

108

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

112

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

114

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

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

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

116

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

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

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

117

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

119

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

122

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

124

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

128

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

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

130

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

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

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

133

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

134

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

136

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

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

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

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

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

137

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

138

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

140

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

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

145

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

148

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

149

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

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

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

150

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

152

1.1
Location : select
Killed by : net.bmahe.genetics4j.gp.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.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.gp.selection.DoubleTournamentSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.selection.DoubleTournamentSelectionPolicyHandlerTest]/[method:selectMaximizeAndDoFitnessLast()]
removed call to net/bmahe/genetics4j/core/Individual::genotype → KILLED

157

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

Active mutators

Tests examined


Report generated by PIT 1.20.3