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

Mutations

38

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

39

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

40

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

41

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

50

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

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()]
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

53

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

54

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 : none
Substituted 1 with 0 → SURVIVED Covering tests

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

55

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

58

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

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::<init> → 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()]
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

63

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

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()]
removed call to java/util/List::get → 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()]
removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getSize → KILLED

67

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

72

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

73

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

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 return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomMutateMutator::duplicateAndMutate → KILLED

84

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

85

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

90

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

91

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

92

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

93

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

96

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

97

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

100

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

102

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

103

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

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

109

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

111

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

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

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

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

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

112

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

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

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

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

114

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

115

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

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

116

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

117

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

120

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

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

121

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

122

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

123

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

131

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

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

Active mutators

Tests examined


Report generated by PIT 1.20.3