MultiTournamentsSelectionPolicyHandler.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.Objects;
7
import java.util.random.RandomGenerator;
8
import java.util.stream.Collectors;
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.spec.AbstractEAConfiguration;
18
import net.bmahe.genetics4j.core.spec.AbstractEAExecutionContext;
19
import net.bmahe.genetics4j.core.spec.selection.MultiTournaments;
20
import net.bmahe.genetics4j.core.spec.selection.SelectionPolicy;
21
import net.bmahe.genetics4j.core.spec.selection.Tournament;
22
23
public class MultiTournamentsSelectionPolicyHandler<T extends Comparable<T>> implements SelectionPolicyHandler<T> {
24
	final static public Logger logger = LogManager.getLogger(MultiTournamentsSelectionPolicyHandler.class);
25
26
	private final RandomGenerator randomGenerator;
27
28
	private List<Individual<T>> pickRandomCandidates(final RandomGenerator randomGenerator,
29
			final List<Genotype> population, final List<T> fitnessScore, final int numCandidates) {
30
		Objects.requireNonNull(randomGenerator);
31
		Objects.requireNonNull(population);
32
		Objects.requireNonNull(fitnessScore);
33
		Validate.isTrue(fitnessScore.size() > 0);
34
		Validate.isTrue(numCandidates > 0);
35
36 4 1. pickRandomCandidates : removed call to java/util/List::size → SURVIVED
2. pickRandomCandidates : Substituted 0 with 1 → SURVIVED
3. pickRandomCandidates : replaced return value with Collections.emptyList for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::pickRandomCandidates → KILLED
4. pickRandomCandidates : removed call to java/util/random/RandomGenerator::ints → KILLED
		return randomGenerator.ints(0, fitnessScore.size())
37 1 1. pickRandomCandidates : removed call to java/util/stream/IntStream::boxed → KILLED
				.boxed()
38 2 1. pickRandomCandidates : replaced call to java/util/stream/Stream::limit with receiver → SURVIVED
2. pickRandomCandidates : removed call to java/util/stream/Stream::limit → KILLED
				.limit(numCandidates)
39 8 1. lambda$pickRandomCandidates$0 : replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::lambda$pickRandomCandidates$0 → KILLED
2. pickRandomCandidates : removed call to java/util/stream/Stream::map → KILLED
3. lambda$pickRandomCandidates$0 : removed call to java/lang/Integer::intValue → KILLED
4. lambda$pickRandomCandidates$0 : removed call to java/util/List::get → KILLED
5. pickRandomCandidates : replaced call to java/util/stream/Stream::map with receiver → KILLED
6. lambda$pickRandomCandidates$0 : removed call to java/util/List::get → KILLED
7. lambda$pickRandomCandidates$0 : removed call to net/bmahe/genetics4j/core/Individual::of → KILLED
8. lambda$pickRandomCandidates$0 : removed call to java/lang/Integer::intValue → KILLED
				.map(i -> Individual.of(population.get(i), fitnessScore.get(i)))
40 2 1. pickRandomCandidates : removed call to java/util/stream/Stream::collect → KILLED
2. pickRandomCandidates : removed call to java/util/stream/Collectors::toList → KILLED
				.collect(Collectors.toList());
41
	}
42
43
	private Individual<T> runTournament(final Tournament<T> tournament, final List<Genotype> population,
44
			final List<T> fitnessScore, final List<Individual<T>> candidates) {
45
		Objects.requireNonNull(tournament);
46
47 1 1. runTournament : removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::comparator → KILLED
		final Comparator<Individual<T>> comparator = tournament.comparator();
48
49 4 1. runTournament : removed call to java/util/Optional::get → KILLED
2. runTournament : removed call to java/util/List::stream → KILLED
3. runTournament : removed call to java/util/stream/Stream::max → KILLED
4. runTournament : replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED
		return candidates.stream().max(comparator).get();
50
	}
51
52
	private Individual<T> runTournament(final RandomGenerator randomGenerator, final List<Tournament<T>> tournaments,
53
			final List<Genotype> population, final List<T> fitnessScore, final int tournamentIndex) {
54
		Objects.requireNonNull(tournaments);
55
		Objects.requireNonNull(population);
56
		Objects.requireNonNull(fitnessScore);
57
		Validate.isTrue(tournamentIndex < tournaments.size());
58
		Validate.isTrue(tournamentIndex >= 0);
59
60 1 1. runTournament : removed call to java/util/List::get → KILLED
		final Tournament<T> tournament = tournaments.get(tournamentIndex);
61 1 1. runTournament : removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::numCandidates → KILLED
		final int numCandidates = tournament.numCandidates();
62
63
		List<Individual<T>> candidates;
64 3 1. runTournament : negated conditional → KILLED
2. runTournament : removed conditional - replaced equality check with true → KILLED
3. runTournament : removed conditional - replaced equality check with false → KILLED
		if (tournamentIndex == 0) {
65 2 1. runTournament : removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::pickRandomCandidates → KILLED
2. runTournament : replaced call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::pickRandomCandidates with argument → KILLED
			candidates = pickRandomCandidates(randomGenerator, population, fitnessScore, numCandidates);
66
		} else {
67 1 1. runTournament : removed call to java/util/ArrayList::<init> → KILLED
			candidates = new ArrayList<>();
68
69 5 1. runTournament : removed conditional - replaced comparison check with false → KILLED
2. runTournament : changed conditional boundary → KILLED
3. runTournament : Substituted 0 with 1 → KILLED
4. runTournament : negated conditional → KILLED
5. runTournament : removed conditional - replaced comparison check with true → KILLED
			for (int i = 0; i < numCandidates; i++) {
70 3 1. runTournament : Replaced integer subtraction with addition → KILLED
2. runTournament : Substituted 1 with 0 → KILLED
3. runTournament : removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED
				final Individual<T> candidate = runTournament(
71
						randomGenerator,
72
							tournaments,
73
							population,
74
							fitnessScore,
75
							tournamentIndex - 1);
76 1 1. runTournament : removed call to java/util/List::add → KILLED
				candidates.add(candidate);
77
			}
78
		}
79
80 2 1. runTournament : replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED
2. runTournament : removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED
		return runTournament(tournament, population, fitnessScore, candidates);
81
82
	}
83
84
	public MultiTournamentsSelectionPolicyHandler(final RandomGenerator _randomGenerator) {
85
		Objects.requireNonNull(_randomGenerator);
86
87 1 1. <init> : Removed assignment to member variable randomGenerator → KILLED
		this.randomGenerator = _randomGenerator;
88
	}
89
90
	@Override
91
	public boolean canHandle(final SelectionPolicy selectionPolicy) {
92
		Objects.requireNonNull(selectionPolicy);
93 2 1. canHandle : replaced boolean return with true for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::canHandle → KILLED
2. canHandle : replaced boolean return with false for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::canHandle → KILLED
		return selectionPolicy instanceof MultiTournaments;
94
	}
95
96
	@Override
97
	public Selector<T> resolve(final AbstractEAExecutionContext<T> eaExecutionContext,
98
			final AbstractEAConfiguration<T> eaConfiguration,
99
			final SelectionPolicyHandlerResolver<T> selectionPolicyHandlerResolver,
100
			final SelectionPolicy selectionPolicy) {
101
		Objects.requireNonNull(selectionPolicy);
102
		Validate.isInstanceOf(MultiTournaments.class, selectionPolicy);
103
104 4 1. resolve : removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler$1::<init> → KILLED
2. resolve : replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::resolve → KILLED
3. <init> : Removed assignment to member variable this$0 → KILLED
4. <init> : Removed assignment to member variable val$selectionPolicy → KILLED
		return new Selector<T>() {
105
106
			@Override
107
			public Population<T> select(final AbstractEAConfiguration<T> eaConfiguration, final long generation,
108
					final int numIndividuals, final List<Genotype> population, final List<T> fitnessScore) {
109
				Objects.requireNonNull(eaConfiguration);
110
				Objects.requireNonNull(population);
111
				Objects.requireNonNull(fitnessScore);
112
				Validate.isTrue(numIndividuals > 0);
113
				Validate.isTrue(population.size() == fitnessScore.size());
114
115
				@SuppressWarnings("unchecked")
116
				final MultiTournaments<T> multiTournaments = (MultiTournaments<T>) selectionPolicy;
117 1 1. select : removed call to net/bmahe/genetics4j/core/spec/selection/MultiTournaments::tournaments → KILLED
				final List<Tournament<T>> tournaments = multiTournaments.tournaments();
118
119
				logger.debug("Selecting {} individuals", numIndividuals);
120 1 1. select : removed call to net/bmahe/genetics4j/core/Population::<init> → KILLED
				final Population<T> selectedIndividuals = new Population<>();
121 5 1. select : changed conditional boundary → KILLED
2. select : removed conditional - replaced comparison check with false → KILLED
3. select : negated conditional → KILLED
4. select : removed call to net/bmahe/genetics4j/core/Population::size → KILLED
5. select : removed conditional - replaced comparison check with true → KILLED
				while (selectedIndividuals.size() < numIndividuals) {
122 1 1. select : removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED
					final Individual<T> selectedIndividual = runTournament(
123
							randomGenerator,
124
								tournaments,
125
								population,
126
								fitnessScore,
127 3 1. select : Substituted 1 with 0 → KILLED
2. select : Replaced integer subtraction with addition → KILLED
3. select : removed call to java/util/List::size → KILLED
								tournaments.size() - 1);
128 1 1. select : removed call to net/bmahe/genetics4j/core/Population::add → KILLED
					selectedIndividuals.add(selectedIndividual);
129
				}
130
131 1 1. select : replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler$1::select → KILLED
				return selectedIndividuals;
132
			}
133
		};
134
	}
135
}

Mutations

36

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

2.2
Location : pickRandomCandidates
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
replaced return value with Collections.emptyList for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::pickRandomCandidates → KILLED

3.3
Location : pickRandomCandidates
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/random/RandomGenerator::ints → KILLED

4.4
Location : pickRandomCandidates
Killed by : none
Substituted 0 with 1 → SURVIVED Covering tests

37

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

38

1.1
Location : pickRandomCandidates
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/stream/Stream::limit → KILLED

2.2
Location : pickRandomCandidates
Killed by : none
replaced call to java/util/stream/Stream::limit with receiver → SURVIVED
Covering tests

39

1.1
Location : lambda$pickRandomCandidates$0
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::lambda$pickRandomCandidates$0 → KILLED

2.2
Location : pickRandomCandidates
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/stream/Stream::map → KILLED

3.3
Location : lambda$pickRandomCandidates$0
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/lang/Integer::intValue → KILLED

4.4
Location : lambda$pickRandomCandidates$0
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/List::get → KILLED

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

6.6
Location : lambda$pickRandomCandidates$0
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/List::get → KILLED

7.7
Location : lambda$pickRandomCandidates$0
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/Individual::of → KILLED

8.8
Location : lambda$pickRandomCandidates$0
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/lang/Integer::intValue → KILLED

40

1.1
Location : pickRandomCandidates
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/stream/Stream::collect → KILLED

2.2
Location : pickRandomCandidates
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/stream/Collectors::toList → KILLED

47

1.1
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::comparator → KILLED

49

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

2.2
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/List::stream → KILLED

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

4.4
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED

60

1.1
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/List::get → KILLED

61

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

64

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

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

3.3
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed conditional - replaced equality check with false → KILLED

65

1.1
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::pickRandomCandidates → KILLED

2.2
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
replaced call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::pickRandomCandidates with argument → KILLED

67

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

69

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

2.2
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
changed conditional boundary → KILLED

3.3
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
Substituted 0 with 1 → KILLED

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

5.5
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed conditional - replaced comparison check with true → KILLED

70

1.1
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
Replaced integer subtraction with addition → KILLED

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

3.3
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED

76

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

80

1.1
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED

2.2
Location : runTournament
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED

87

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

93

1.1
Location : canHandle
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:canHandle()]
replaced boolean return with true for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::canHandle → KILLED

2.2
Location : canHandle
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:canHandle()]
replaced boolean return with false for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::canHandle → KILLED

104

1.1
Location : resolve
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler$1::<init> → KILLED

2.2
Location : resolve
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::resolve → KILLED

3.3
Location : <init>
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
Removed assignment to member variable this$0 → KILLED

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

117

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/spec/selection/MultiTournaments::tournaments → KILLED

120

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

121

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

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

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

4.4
Location : select
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/Population::size → KILLED

5.5
Location : select
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed conditional - replaced comparison check with true → KILLED

122

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler::runTournament → KILLED

127

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

2.2
Location : select
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
Replaced integer subtraction with addition → KILLED

3.3
Location : select
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to java/util/List::size → KILLED

128

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
removed call to net/bmahe/genetics4j/core/Population::add → KILLED

131

1.1
Location : select
Killed by : net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.selection.MultiTournamentsSelectionPolicyHandlerTest]/[method:selectMaxThenMin()]
replaced return value with null for net/bmahe/genetics4j/core/selection/MultiTournamentsSelectionPolicyHandler$1::select → KILLED

Active mutators

Tests examined


Report generated by PIT 1.20.3