NeatChromosomeDeleteNodeMutationHandler.java

1
package net.bmahe.genetics4j.neat.mutation.chromosome;
2
3
import java.util.ArrayList;
4
import java.util.HashSet;
5
import java.util.List;
6
import java.util.Set;
7
import java.util.random.RandomGenerator;
8
import java.util.stream.Stream;
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.chromosomes.Chromosome;
15
import net.bmahe.genetics4j.core.mutation.chromosome.ChromosomeMutationHandler;
16
import net.bmahe.genetics4j.core.spec.chromosome.ChromosomeSpec;
17
import net.bmahe.genetics4j.core.spec.mutation.MutationPolicy;
18
import net.bmahe.genetics4j.neat.Connection;
19
import net.bmahe.genetics4j.neat.chromosomes.NeatChromosome;
20
import net.bmahe.genetics4j.neat.spec.NeatChromosomeSpec;
21
import net.bmahe.genetics4j.neat.spec.mutation.DeleteNode;
22
23
public class NeatChromosomeDeleteNodeMutationHandler implements ChromosomeMutationHandler<NeatChromosome> {
24
25
	public static final Logger logger = LogManager.getLogger(NeatChromosomeDeleteNodeMutationHandler.class);
26
27
	private final RandomGenerator randomGenerator;
28
29
	public NeatChromosomeDeleteNodeMutationHandler(final RandomGenerator _randomGenerator) {
30
		Validate.notNull(_randomGenerator);
31
32 1 1. <init> : Removed assignment to member variable randomGenerator → SURVIVED
		this.randomGenerator = _randomGenerator;
33
	}
34
35
	@Override
36
	public boolean canHandle(final MutationPolicy mutationPolicy, final ChromosomeSpec chromosome) {
37
		Validate.notNull(mutationPolicy);
38
		Validate.notNull(chromosome);
39
40 9 1. canHandle : removed conditional - replaced equality check with true → KILLED
2. canHandle : replaced boolean return with true for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::canHandle → KILLED
3. canHandle : removed conditional - replaced equality check with false → KILLED
4. canHandle : removed conditional - replaced equality check with false → KILLED
5. canHandle : negated conditional → KILLED
6. canHandle : Substituted 1 with 0 → KILLED
7. canHandle : Substituted 0 with 1 → KILLED
8. canHandle : negated conditional → KILLED
9. canHandle : removed conditional - replaced equality check with true → KILLED
		return mutationPolicy instanceof DeleteNode && chromosome instanceof NeatChromosomeSpec;
41
	}
42
43
	@Override
44
	public NeatChromosome mutate(final MutationPolicy mutationPolicy, final Chromosome chromosome) {
45
		Validate.notNull(mutationPolicy);
46
		Validate.notNull(chromosome);
47
		Validate.isInstanceOf(DeleteNode.class, mutationPolicy);
48
		Validate.isInstanceOf(NeatChromosome.class, chromosome);
49
50
		final var neatChromosome = (NeatChromosome) chromosome;
51 1 1. mutate : removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getNumInputs → KILLED
		final var numInputs = neatChromosome.getNumInputs();
52 1 1. mutate : removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getNumOutputs → KILLED
		final var numOutputs = neatChromosome.getNumOutputs();
53 1 1. mutate : removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getMinWeightValue → KILLED
		final var minValue = neatChromosome.getMinWeightValue();
54 1 1. mutate : removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getMaxWeightValue → KILLED
		final var maxValue = neatChromosome.getMaxWeightValue();
55
56 1 1. mutate : removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getConnections → KILLED
		final var oldConnections = neatChromosome.getConnections();
57
58 1 1. mutate : removed call to java/util/HashSet::<init> → KILLED
		final Set<Integer> inoutNodes = new HashSet<>();
59 2 1. mutate : removed call to java/util/Set::addAll → KILLED
2. mutate : removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getInputNodeIndices → KILLED
		inoutNodes.addAll(neatChromosome.getInputNodeIndices());
60 2 1. mutate : removed call to java/util/Set::addAll → SURVIVED
2. mutate : removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getOutputNodeIndices → KILLED
		inoutNodes.addAll(neatChromosome.getOutputNodeIndices());
61
62 1 1. mutate : removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getConnections → KILLED
		final List<Integer> allNodeValues = neatChromosome.getConnections()
63 1 1. mutate : removed call to java/util/List::stream → KILLED
				.stream()
64 11 1. lambda$mutate$0 : Substituted 0 with 1 → KILLED
2. mutate : replaced call to java/util/stream/Stream::flatMap with receiver → KILLED
3. lambda$mutate$0 : removed call to net/bmahe/genetics4j/neat/Connection::toNodeIndex → KILLED
4. lambda$mutate$0 : removed call to java/util/stream/Stream::of → KILLED
5. lambda$mutate$0 : removed call to java/lang/Integer::valueOf → KILLED
6. lambda$mutate$0 : Substituted 1 with 0 → KILLED
7. lambda$mutate$0 : Substituted 2 with 3 → KILLED
8. lambda$mutate$0 : removed call to net/bmahe/genetics4j/neat/Connection::fromNodeIndex → KILLED
9. mutate : removed call to java/util/stream/Stream::flatMap → KILLED
10. lambda$mutate$0 : removed call to java/lang/Integer::valueOf → KILLED
11. lambda$mutate$0 : replaced return value with Stream.empty for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::lambda$mutate$0 → KILLED
				.flatMap(connection -> Stream.of(connection.fromNodeIndex(), connection.toNodeIndex()))
65 9 1. lambda$mutate$1 : removed conditional - replaced equality check with true → KILLED
2. lambda$mutate$1 : replaced boolean return with true for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::lambda$mutate$1 → KILLED
3. mutate : replaced call to java/util/stream/Stream::filter with receiver → KILLED
4. lambda$mutate$1 : Substituted 0 with 1 → KILLED
5. mutate : removed call to java/util/stream/Stream::filter → KILLED
6. lambda$mutate$1 : Substituted 1 with 0 → KILLED
7. lambda$mutate$1 : negated conditional → KILLED
8. lambda$mutate$1 : removed conditional - replaced equality check with false → KILLED
9. lambda$mutate$1 : removed call to java/util/Set::contains → KILLED
				.filter(nodeIndex -> inoutNodes.contains(nodeIndex) == false)
66 1 1. mutate : removed call to java/util/stream/Stream::toList → KILLED
				.toList();
67
68 1 1. mutate : removed call to java/util/Set::copyOf → KILLED
		final Set<Integer> nodeValues = Set.copyOf(allNodeValues);
69
70 3 1. mutate : Changed switch default to be first case → KILLED
2. mutate : removed call to java/util/Set::size → KILLED
3. mutate : RemoveSwitch 0 (case value 0) → KILLED
		final List<Connection> newConnections = switch (nodeValues.size()) {
71 1 1. mutate : removed call to java/util/ArrayList::<init> → KILLED
			case 0 -> new ArrayList<>(oldConnections);
72
			default -> {
73 12 1. mutate : removed call to java/util/Set::size → SURVIVED
2. mutate : removed call to java/util/random/RandomGenerator::nextInt → NO_COVERAGE
3. mutate : removed conditional - replaced comparison check with false → SURVIVED
4. mutate : Substituted 1 with 0 → NO_COVERAGE
5. mutate : replaced call to java/util/random/RandomGenerator::nextInt with argument → NO_COVERAGE
6. mutate : removed call to java/util/Set::size → NO_COVERAGE
7. mutate : Replaced integer subtraction with addition → NO_COVERAGE
8. mutate : Substituted 0 with 1 → KILLED
9. mutate : changed conditional boundary → KILLED
10. mutate : negated conditional → KILLED
11. mutate : removed conditional - replaced comparison check with true → KILLED
12. mutate : Substituted 1 with 0 → KILLED
				final int nodeIndexToRemove = nodeValues.size() > 1 ? randomGenerator.nextInt(nodeValues.size() - 1) : 0;
74
75 1 1. mutate : removed call to java/util/Set::stream → KILLED
				final int nodeValueToRemove = nodeValues.stream()
76 2 1. mutate : replaced call to java/util/stream/Stream::skip with receiver → SURVIVED
2. mutate : removed call to java/util/stream/Stream::skip → KILLED
						.skip(nodeIndexToRemove)
77 1 1. mutate : removed call to java/util/stream/Stream::findFirst → KILLED
						.findFirst()
78 2 1. mutate : removed call to java/lang/Integer::intValue → KILLED
2. mutate : removed call to java/util/Optional::get → KILLED
						.get();
79
80 1 1. mutate : removed call to java/util/List::stream → KILLED
				yield oldConnections.stream()
81 7 1. lambda$mutate$2 : removed call to net/bmahe/genetics4j/neat/Connection::fromNodeIndex → KILLED
2. mutate : replaced call to java/util/stream/Stream::filter with receiver → KILLED
3. lambda$mutate$2 : removed conditional - replaced equality check with true → KILLED
4. lambda$mutate$2 : replaced boolean return with true for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::lambda$mutate$2 → KILLED
5. lambda$mutate$2 : negated conditional → KILLED
6. lambda$mutate$2 : removed conditional - replaced equality check with false → KILLED
7. mutate : removed call to java/util/stream/Stream::filter → KILLED
						.filter(connection -> connection.fromNodeIndex() != nodeValueToRemove
82 6 1. lambda$mutate$2 : negated conditional → KILLED
2. lambda$mutate$2 : removed conditional - replaced equality check with false → KILLED
3. lambda$mutate$2 : removed call to net/bmahe/genetics4j/neat/Connection::toNodeIndex → KILLED
4. lambda$mutate$2 : Substituted 1 with 0 → KILLED
5. lambda$mutate$2 : removed conditional - replaced equality check with true → KILLED
6. lambda$mutate$2 : Substituted 0 with 1 → KILLED
								&& connection.toNodeIndex() != nodeValueToRemove)
83 1 1. mutate : removed call to java/util/stream/Stream::toList → KILLED
						.toList();
84
			}
85
		};
86
87 2 1. mutate : removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::<init> → KILLED
2. mutate : replaced return value with null for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::mutate → KILLED
		return new NeatChromosome(numInputs, numOutputs, minValue, maxValue, newConnections);
88
	}
89
}

Mutations

32

1.1
Location : <init>
Killed by : none
Removed assignment to member variable randomGenerator → SURVIVED
Covering tests

40

1.1
Location : canHandle
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:canHandle()]
removed conditional - replaced equality check with true → KILLED

2.2
Location : canHandle
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:canHandle()]
replaced boolean return with true for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::canHandle → KILLED

3.3
Location : canHandle
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:canHandle()]
removed conditional - replaced equality check with false → KILLED

4.4
Location : canHandle
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:canHandle()]
removed conditional - replaced equality check with false → KILLED

5.5
Location : canHandle
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:canHandle()]
negated conditional → KILLED

6.6
Location : canHandle
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:canHandle()]
Substituted 1 with 0 → KILLED

7.7
Location : canHandle
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:canHandle()]
Substituted 0 with 1 → KILLED

8.8
Location : canHandle
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:canHandle()]
negated conditional → KILLED

9.9
Location : canHandle
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:canHandle()]
removed conditional - replaced equality check with true → KILLED

51

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getNumInputs → KILLED

52

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getNumOutputs → KILLED

53

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getMinWeightValue → KILLED

54

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getMaxWeightValue → KILLED

56

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getConnections → KILLED

58

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to java/util/HashSet::<init> → KILLED

59

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/Set::addAll → KILLED

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getInputNodeIndices → KILLED

60

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getOutputNodeIndices → KILLED

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

62

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::getConnections → KILLED

63

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to java/util/List::stream → KILLED

64

1.1
Location : lambda$mutate$0
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
Substituted 0 with 1 → KILLED

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
replaced call to java/util/stream/Stream::flatMap with receiver → KILLED

3.3
Location : lambda$mutate$0
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to net/bmahe/genetics4j/neat/Connection::toNodeIndex → KILLED

4.4
Location : lambda$mutate$0
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/stream/Stream::of → KILLED

5.5
Location : lambda$mutate$0
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/lang/Integer::valueOf → KILLED

6.6
Location : lambda$mutate$0
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
Substituted 1 with 0 → KILLED

7.7
Location : lambda$mutate$0
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
Substituted 2 with 3 → KILLED

8.8
Location : lambda$mutate$0
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputFromNode()]
removed call to net/bmahe/genetics4j/neat/Connection::fromNodeIndex → KILLED

9.9
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to java/util/stream/Stream::flatMap → KILLED

10.10
Location : lambda$mutate$0
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/lang/Integer::valueOf → KILLED

11.11
Location : lambda$mutate$0
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
replaced return value with Stream.empty for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::lambda$mutate$0 → KILLED

65

1.1
Location : lambda$mutate$1
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed conditional - replaced equality check with true → KILLED

2.2
Location : lambda$mutate$1
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
replaced boolean return with true for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::lambda$mutate$1 → KILLED

3.3
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
replaced call to java/util/stream/Stream::filter with receiver → KILLED

4.4
Location : lambda$mutate$1
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
Substituted 0 with 1 → KILLED

5.5
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to java/util/stream/Stream::filter → KILLED

6.6
Location : lambda$mutate$1
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
Substituted 1 with 0 → KILLED

7.7
Location : lambda$mutate$1
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
negated conditional → KILLED

8.8
Location : lambda$mutate$1
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed conditional - replaced equality check with false → KILLED

9.9
Location : lambda$mutate$1
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/Set::contains → KILLED

66

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to java/util/stream/Stream::toList → KILLED

68

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to java/util/Set::copyOf → KILLED

70

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
Changed switch default to be first case → KILLED

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/Set::size → KILLED

3.3
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
RemoveSwitch 0 (case value 0) → KILLED

71

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to java/util/ArrayList::<init> → KILLED

73

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
Substituted 0 with 1 → KILLED

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

3.3
Location : mutate
Killed by : none
removed call to java/util/random/RandomGenerator::nextInt → NO_COVERAGE

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

5.5
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
changed conditional boundary → KILLED

6.6
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
negated conditional → KILLED

7.7
Location : mutate
Killed by : none
Substituted 1 with 0 → NO_COVERAGE

8.8
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed conditional - replaced comparison check with true → KILLED

9.9
Location : mutate
Killed by : none
replaced call to java/util/random/RandomGenerator::nextInt with argument → NO_COVERAGE

10.10
Location : mutate
Killed by : none
removed call to java/util/Set::size → NO_COVERAGE

11.11
Location : mutate
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

12.12
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
Substituted 1 with 0 → KILLED

75

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/Set::stream → KILLED

76

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/stream/Stream::skip → KILLED

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

77

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/stream/Stream::findFirst → KILLED

78

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/lang/Integer::intValue → KILLED

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/Optional::get → KILLED

80

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/List::stream → KILLED

81

1.1
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputFromNode()]
removed call to net/bmahe/genetics4j/neat/Connection::fromNodeIndex → KILLED

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
replaced call to java/util/stream/Stream::filter with receiver → KILLED

3.3
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputFromNode()]
removed conditional - replaced equality check with true → KILLED

4.4
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
replaced boolean return with true for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::lambda$mutate$2 → KILLED

5.5
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
negated conditional → KILLED

6.6
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed conditional - replaced equality check with false → KILLED

7.7
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/stream/Stream::filter → KILLED

82

1.1
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
negated conditional → KILLED

2.2
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed conditional - replaced equality check with false → KILLED

3.3
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to net/bmahe/genetics4j/neat/Connection::toNodeIndex → KILLED

4.4
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
Substituted 1 with 0 → KILLED

5.5
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed conditional - replaced equality check with true → KILLED

6.6
Location : lambda$mutate$2
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
Substituted 0 with 1 → KILLED

83

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionOnlyOneNonInputOutputToNode()]
removed call to java/util/stream/Stream::toList → KILLED

87

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
removed call to net/bmahe/genetics4j/neat/chromosomes/NeatChromosome::<init> → KILLED

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.NeatChromosomeDeleteNodeMutationHandlerTest]/[method:mutateConnectionEmpty()]
replaced return value with null for net/bmahe/genetics4j/neat/mutation/chromosome/NeatChromosomeDeleteNodeMutationHandler::mutate → KILLED

Active mutators

Tests examined


Report generated by PIT 1.19.6