ProgramRandomMutateMutator.java

1
package net.bmahe.genetics4j.gp.mutation;
2
3
import java.util.List;
4
import java.util.Objects;
5
import java.util.random.RandomGenerator;
6
7
import org.apache.commons.lang3.Validate;
8
import org.apache.logging.log4j.LogManager;
9
import org.apache.logging.log4j.Logger;
10
11
import net.bmahe.genetics4j.core.Genotype;
12
import net.bmahe.genetics4j.core.chromosomes.Chromosome;
13
import net.bmahe.genetics4j.core.chromosomes.TreeChromosome;
14
import net.bmahe.genetics4j.core.chromosomes.TreeNode;
15
import net.bmahe.genetics4j.core.mutation.Mutator;
16
import net.bmahe.genetics4j.core.spec.AbstractEAConfiguration;
17
import net.bmahe.genetics4j.core.spec.chromosome.ChromosomeSpec;
18
import net.bmahe.genetics4j.gp.Operation;
19
import net.bmahe.genetics4j.gp.program.Program;
20
import net.bmahe.genetics4j.gp.program.ProgramGenerator;
21
import net.bmahe.genetics4j.gp.spec.chromosome.ProgramTreeChromosomeSpec;
22
23
public class ProgramRandomMutateMutator implements Mutator {
24
	final static public Logger logger = LogManager.getLogger(ProgramRandomMutateMutator.class);
25
26
	private final ProgramGenerator programGenerator;
27
	private final RandomGenerator randomGenerator;
28
	private final AbstractEAConfiguration eaConfiguration;
29
	private final double populationMutationProbability;
30
31
	public ProgramRandomMutateMutator(final ProgramGenerator _programGenerator,
32
			final RandomGenerator _randomGenerator,
33
			final AbstractEAConfiguration _eaConfiguration,
34
			final double _populationMutationProbability) {
35
		Objects.requireNonNull(_programGenerator);
36
		Objects.requireNonNull(_randomGenerator);
37
		Objects.requireNonNull(_eaConfiguration);
38
		Validate.inclusiveBetween(0.0, 1.0, _populationMutationProbability);
39
40 1 1. <init> : Removed assignment to member variable programGenerator → KILLED
		this.programGenerator = _programGenerator;
41 1 1. <init> : Removed assignment to member variable randomGenerator → KILLED
		this.randomGenerator = _randomGenerator;
42 1 1. <init> : Removed assignment to member variable eaConfiguration → SURVIVED
		this.eaConfiguration = _eaConfiguration;
43 1 1. <init> : Removed assignment to member variable populationMutationProbability → SURVIVED
		this.populationMutationProbability = _populationMutationProbability;
44
	}
45
46
	protected TreeNode<Operation<?>> duplicateAndMutate(final Program program, final TreeNode<Operation<?>> root,
47
			final int cutPoint, final int nodeIndex, final int currentDepth) {
48
		Objects.requireNonNull(program);
49
		Objects.requireNonNull(root);
50
		Validate.isTrue(cutPoint >= 0);
51
52 1 1. duplicateAndMutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getData → KILLED
		final Operation<?> rootData = root.getData();
53
54 3 1. duplicateAndMutate : negated conditional → KILLED
2. duplicateAndMutate : removed conditional - replaced equality check with false → KILLED
3. duplicateAndMutate : removed conditional - replaced equality check with true → KILLED
		if (nodeIndex == cutPoint) {
55 5 1. duplicateAndMutate : Replaced integer subtraction with addition → SURVIVED
2. duplicateAndMutate : removed call to net/bmahe/genetics4j/gp/program/Program::maxDepth → SURVIVED
3. duplicateAndMutate : replaced call to java/lang/Math::max with argument → SURVIVED
4. duplicateAndMutate : Substituted 1 with 0 → SURVIVED
5. duplicateAndMutate : removed call to java/lang/Math::max → KILLED
			final int depth = Math.max(1, program.maxDepth() - currentDepth);
56 11 1. duplicateAndMutate : changed conditional boundary → SURVIVED
2. duplicateAndMutate : removed conditional - replaced comparison check with false → SURVIVED
3. duplicateAndMutate : Replaced integer subtraction with addition → SURVIVED
4. duplicateAndMutate : Substituted 1 with 0 → SURVIVED
5. duplicateAndMutate : replaced call to java/util/random/RandomGenerator::nextInt with argument → SURVIVED
6. duplicateAndMutate : Substituted 1 with 0 → SURVIVED
7. duplicateAndMutate : negated conditional → SURVIVED
8. duplicateAndMutate : removed conditional - replaced comparison check with true → SURVIVED
9. duplicateAndMutate : removed call to java/util/random/RandomGenerator::nextInt → SURVIVED
10. duplicateAndMutate : Substituted 1 with 0 → KILLED
11. duplicateAndMutate : Replaced integer addition with subtraction → KILLED
			final int maxSubtreeDepth = depth > 1 ? randomGenerator.nextInt(depth - 1) + 1 : depth;
57 3 1. duplicateAndMutate : removed call to net/bmahe/genetics4j/gp/program/ProgramGenerator::generate → KILLED
2. duplicateAndMutate : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate → KILLED
3. duplicateAndMutate : removed call to net/bmahe/genetics4j/gp/Operation::returnedType → KILLED
			return programGenerator.generate(program, maxSubtreeDepth, rootData.returnedType());
58
		}
59
60 1 1. duplicateAndMutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getChildren → KILLED
		final List<TreeNode<Operation<?>>> children = root.getChildren();
61
62 1 1. duplicateAndMutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::<init> → KILLED
		final TreeNode<Operation<?>> duplicateRoot = new TreeNode<Operation<?>>(rootData);
63
64 2 1. duplicateAndMutate : Replaced integer addition with subtraction → KILLED
2. duplicateAndMutate : Substituted 1 with 0 → KILLED
		int currentIndex = nodeIndex + 1;
65 6 1. duplicateAndMutate : changed conditional boundary → KILLED
2. duplicateAndMutate : removed conditional - replaced comparison check with false → KILLED
3. duplicateAndMutate : removed call to java/util/List::size → KILLED
4. duplicateAndMutate : removed conditional - replaced comparison check with true → KILLED
5. duplicateAndMutate : negated conditional → KILLED
6. duplicateAndMutate : Substituted 0 with 1 → KILLED
		for (int i = 0; i < children.size(); i++) {
66 1 1. duplicateAndMutate : removed call to java/util/List::get → KILLED
			final TreeNode<Operation<?>> treeNode = children.get(i);
67 1 1. duplicateAndMutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getSize → KILLED
			final int childSize = treeNode.getSize();
68
69 4 1. duplicateAndMutate : Replaced integer addition with subtraction → SURVIVED
2. duplicateAndMutate : Substituted 1 with 0 → SURVIVED
3. duplicateAndMutate : removed call to net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate → KILLED
4. duplicateAndMutate : replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate with argument → KILLED
			final TreeNode<Operation<?>> childCopy = duplicateAndMutate(
70
					program,
71
						treeNode,
72
						cutPoint,
73
						currentIndex,
74
						currentDepth + 1);
75 1 1. duplicateAndMutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::addChild → KILLED
			duplicateRoot.addChild(childCopy);
76 1 1. duplicateAndMutate : Replaced integer addition with subtraction → KILLED
			currentIndex += childSize;
77
		}
78
79 1 1. duplicateAndMutate : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate → KILLED
		return duplicateRoot;
80
	}
81
82
	@Override
83
	public Genotype mutate(final long generation, final Genotype originalGenotype) {
84
		Validate.isTrue(generation >= 0);
85
		Objects.requireNonNull(originalGenotype);
86
87 5 1. mutate : removed call to java/util/random/RandomGenerator::nextDouble → SURVIVED
2. mutate : changed conditional boundary → SURVIVED
3. mutate : removed conditional - replaced comparison check with true → SURVIVED
4. mutate : removed conditional - replaced comparison check with false → KILLED
5. mutate : negated conditional → KILLED
		if (randomGenerator.nextDouble() >= populationMutationProbability) {
88 1 1. mutate : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::mutate → KILLED
			return originalGenotype;
89
		}
90
91
		logger.trace("Mutating genotype {}", originalGenotype);
92
93 1 1. mutate : removed call to net/bmahe/genetics4j/core/Genotype::getSize → NO_COVERAGE
		final Chromosome[] newChromosomes = new Chromosome[originalGenotype.getSize()];
94 1 1. mutate : removed call to net/bmahe/genetics4j/core/Genotype::getChromosomes → NO_COVERAGE
		final Chromosome[] chromosomes = originalGenotype.getChromosomes();
95 5 1. mutate : removed conditional - replaced comparison check with false → NO_COVERAGE
2. mutate : changed conditional boundary → NO_COVERAGE
3. mutate : Substituted 0 with 1 → NO_COVERAGE
4. mutate : negated conditional → NO_COVERAGE
5. mutate : removed conditional - replaced comparison check with true → NO_COVERAGE
		for (int chromosomeIndex = 0; chromosomeIndex < chromosomes.length; chromosomeIndex++) {
96 1 1. mutate : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::getChromosomeSpec → NO_COVERAGE
			final ChromosomeSpec chromosomeSpec = eaConfiguration.getChromosomeSpec(chromosomeIndex);
97
			final Chromosome chromosome = chromosomes[chromosomeIndex];
98
99 3 1. mutate : negated conditional → NO_COVERAGE
2. mutate : removed conditional - replaced equality check with true → NO_COVERAGE
3. mutate : removed conditional - replaced equality check with false → NO_COVERAGE
			if (chromosomeSpec instanceof ProgramTreeChromosomeSpec == false) {
100 2 1. mutate : removed call to java/lang/String::valueOf → NO_COVERAGE
2. mutate : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
				throw new IllegalArgumentException("This mutator does not support chromosome specs " + chromosomeSpec);
101
			}
102
103 3 1. mutate : removed conditional - replaced equality check with false → NO_COVERAGE
2. mutate : negated conditional → NO_COVERAGE
3. mutate : removed conditional - replaced equality check with true → NO_COVERAGE
			if (chromosome instanceof TreeChromosome<?> == false) {
104
				throw new IllegalArgumentException(
105 3 1. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/Chromosome::getClass → NO_COVERAGE
2. mutate : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
3. mutate : removed call to java/lang/Class::getSimpleName → NO_COVERAGE
						"This mutator does not support chromosome of type " + chromosome.getClass().getSimpleName());
106
			}
107
108
			final ProgramTreeChromosomeSpec programTreeChromosomeSpec = (ProgramTreeChromosomeSpec) chromosomeSpec;
109
110
			final TreeChromosome<Operation<?>> treeChromosome = (TreeChromosome<Operation<?>>) chromosome;
111 1 1. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::getSize → NO_COVERAGE
			final int chromosomeSize = treeChromosome.getSize();
112
113 5 1. mutate : removed conditional - replaced comparison check with false → NO_COVERAGE
2. mutate : changed conditional boundary → NO_COVERAGE
3. mutate : Substituted 2 with 3 → NO_COVERAGE
4. mutate : removed conditional - replaced comparison check with true → NO_COVERAGE
5. mutate : negated conditional → NO_COVERAGE
			if (chromosomeSize > 2) {
114 4 1. mutate : replaced call to java/util/random/RandomGenerator::nextInt with argument → NO_COVERAGE
2. mutate : Substituted 1 with 0 → NO_COVERAGE
3. mutate : Replaced integer subtraction with addition → NO_COVERAGE
4. mutate : removed call to java/util/random/RandomGenerator::nextInt → NO_COVERAGE
				final int cutPoint = randomGenerator.nextInt(chromosomeSize - 1);
115
116 1 1. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::getRoot → NO_COVERAGE
				final TreeNode<Operation<?>> root = treeChromosome.getRoot();
117 2 1. mutate : replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate with argument → NO_COVERAGE
2. mutate : removed call to net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate → NO_COVERAGE
				final TreeNode<Operation<?>> newRoot = duplicateAndMutate(
118 3 1. mutate : Substituted 0 with 1 → NO_COVERAGE
2. mutate : Substituted 0 with 1 → NO_COVERAGE
3. mutate : removed call to net/bmahe/genetics4j/gp/spec/chromosome/ProgramTreeChromosomeSpec::program → NO_COVERAGE
						programTreeChromosomeSpec.program(),
119
							root,
120
							cutPoint,
121
							0,
122
							0);
123 1 1. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::<init> → NO_COVERAGE
				final TreeChromosome<Operation<?>> newTreeChromosome = new TreeChromosome<>(newRoot);
124
				newChromosomes[chromosomeIndex] = newTreeChromosome;
125
			} else {
126
				final TreeNode<Operation<Object>> newRoot = programGenerator
127 4 1. mutate : removed call to net/bmahe/genetics4j/gp/spec/chromosome/ProgramTreeChromosomeSpec::program → NO_COVERAGE
2. mutate : removed call to net/bmahe/genetics4j/gp/program/Program::maxDepth → NO_COVERAGE
3. mutate : removed call to net/bmahe/genetics4j/gp/spec/chromosome/ProgramTreeChromosomeSpec::program → NO_COVERAGE
4. mutate : removed call to net/bmahe/genetics4j/gp/program/ProgramGenerator::generate → NO_COVERAGE
						.generate(programTreeChromosomeSpec.program(), programTreeChromosomeSpec.program().maxDepth());
128 1 1. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::<init> → NO_COVERAGE
				final TreeChromosome<Operation<Object>> newTreeChromosome = new TreeChromosome<>(newRoot);
129
130
				newChromosomes[chromosomeIndex] = newTreeChromosome;
131
			}
132
133
			logger.trace("\tChromosome {} - {}", chromosomeIndex, newChromosomes[chromosomeIndex]);
134
		}
135
136 2 1. mutate : removed call to net/bmahe/genetics4j/core/Genotype::<init> → NO_COVERAGE
2. mutate : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::mutate → NO_COVERAGE
		return new Genotype(newChromosomes);
137
	}
138
}

Mutations

40

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
Removed assignment to member variable programGenerator → KILLED

41

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

42

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

43

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

52

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getData → KILLED

54

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
negated conditional → KILLED

2.2
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed conditional - replaced equality check with false → KILLED

3.3
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed conditional - replaced equality check with true → KILLED

55

1.1
Location : duplicateAndMutate
Killed by : none
Replaced integer subtraction with addition → SURVIVED
Covering tests

2.2
Location : duplicateAndMutate
Killed by : none
removed call to net/bmahe/genetics4j/gp/program/Program::maxDepth → SURVIVED Covering tests

3.3
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to java/lang/Math::max → KILLED

4.4
Location : duplicateAndMutate
Killed by : none
replaced call to java/lang/Math::max with argument → SURVIVED Covering tests

5.5
Location : duplicateAndMutate
Killed by : none
Substituted 1 with 0 → SURVIVED Covering tests

56

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

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

3.3
Location : duplicateAndMutate
Killed by : none
Replaced integer subtraction with addition → SURVIVED Covering tests

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

5.5
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
Substituted 1 with 0 → KILLED

6.6
Location : duplicateAndMutate
Killed by : none
replaced call to java/util/random/RandomGenerator::nextInt with argument → SURVIVED Covering tests

7.7
Location : duplicateAndMutate
Killed by : none
Substituted 1 with 0 → SURVIVED Covering tests

8.8
Location : duplicateAndMutate
Killed by : none
negated conditional → SURVIVED Covering tests

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

10.10
Location : duplicateAndMutate
Killed by : none
removed call to java/util/random/RandomGenerator::nextInt → SURVIVED Covering tests

11.11
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
Replaced integer addition with subtraction → KILLED

57

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/gp/program/ProgramGenerator::generate → KILLED

2.2
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate → KILLED

3.3
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/gp/Operation::returnedType → KILLED

60

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getChildren → KILLED

62

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::<init> → KILLED

64

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
Replaced integer addition with subtraction → KILLED

2.2
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
Substituted 1 with 0 → KILLED

65

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
changed conditional boundary → KILLED

2.2
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed conditional - replaced comparison check with false → KILLED

3.3
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to java/util/List::size → KILLED

4.4
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed conditional - replaced comparison check with true → KILLED

5.5
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
negated conditional → KILLED

6.6
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
Substituted 0 with 1 → KILLED

66

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to java/util/List::get → KILLED

67

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getSize → KILLED

69

1.1
Location : duplicateAndMutate
Killed by : none
Replaced integer addition with subtraction → SURVIVED
Covering tests

2.2
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate → KILLED

3.3
Location : duplicateAndMutate
Killed by : none
Substituted 1 with 0 → SURVIVED Covering tests

4.4
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate with argument → KILLED

75

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::addChild → KILLED

76

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
Replaced integer addition with subtraction → KILLED

79

1.1
Location : duplicateAndMutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:simple()]
replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate → KILLED

87

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

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:noMutate()]
removed conditional - replaced comparison check with false → KILLED

3.3
Location : mutate
Killed by : none
changed conditional boundary → SURVIVED Covering tests

4.4
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:noMutate()]
negated conditional → KILLED

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

88

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutatorTest]/[method:noMutate()]
replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::mutate → KILLED

93

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/core/Genotype::getSize → NO_COVERAGE

94

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/core/Genotype::getChromosomes → NO_COVERAGE

95

1.1
Location : mutate
Killed by : none
removed conditional - replaced comparison check with false → NO_COVERAGE

2.2
Location : mutate
Killed by : none
changed conditional boundary → NO_COVERAGE

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

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

5.5
Location : mutate
Killed by : none
removed conditional - replaced comparison check with true → NO_COVERAGE

96

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::getChromosomeSpec → NO_COVERAGE

99

1.1
Location : mutate
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : mutate
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

3.3
Location : mutate
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

100

1.1
Location : mutate
Killed by : none
removed call to java/lang/String::valueOf → NO_COVERAGE

2.2
Location : mutate
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

103

1.1
Location : mutate
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

2.2
Location : mutate
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : mutate
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

105

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/core/chromosomes/Chromosome::getClass → NO_COVERAGE

2.2
Location : mutate
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

3.3
Location : mutate
Killed by : none
removed call to java/lang/Class::getSimpleName → NO_COVERAGE

111

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::getSize → NO_COVERAGE

113

1.1
Location : mutate
Killed by : none
removed conditional - replaced comparison check with false → NO_COVERAGE

2.2
Location : mutate
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : mutate
Killed by : none
Substituted 2 with 3 → NO_COVERAGE

4.4
Location : mutate
Killed by : none
removed conditional - replaced comparison check with true → NO_COVERAGE

5.5
Location : mutate
Killed by : none
negated conditional → NO_COVERAGE

114

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

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

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

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

116

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::getRoot → NO_COVERAGE

117

1.1
Location : mutate
Killed by : none
replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate with argument → NO_COVERAGE

2.2
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate → NO_COVERAGE

118

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

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

3.3
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/gp/spec/chromosome/ProgramTreeChromosomeSpec::program → NO_COVERAGE

123

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::<init> → NO_COVERAGE

127

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/gp/spec/chromosome/ProgramTreeChromosomeSpec::program → NO_COVERAGE

2.2
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/gp/program/Program::maxDepth → NO_COVERAGE

3.3
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/gp/spec/chromosome/ProgramTreeChromosomeSpec::program → NO_COVERAGE

4.4
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/gp/program/ProgramGenerator::generate → NO_COVERAGE

128

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::<init> → NO_COVERAGE

136

1.1
Location : mutate
Killed by : none
removed call to net/bmahe/genetics4j/core/Genotype::<init> → NO_COVERAGE

2.2
Location : mutate
Killed by : none
replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::mutate → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.20.3