ProgramRandomPruneMutator.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
9
import net.bmahe.genetics4j.core.Genotype;
10
import net.bmahe.genetics4j.core.chromosomes.Chromosome;
11
import net.bmahe.genetics4j.core.chromosomes.TreeChromosome;
12
import net.bmahe.genetics4j.core.chromosomes.TreeNode;
13
import net.bmahe.genetics4j.core.mutation.Mutator;
14
import net.bmahe.genetics4j.core.spec.AbstractEAConfiguration;
15
import net.bmahe.genetics4j.core.spec.chromosome.ChromosomeSpec;
16
import net.bmahe.genetics4j.gp.Operation;
17
import net.bmahe.genetics4j.gp.OperationFactory;
18
import net.bmahe.genetics4j.gp.program.Program;
19
import net.bmahe.genetics4j.gp.program.ProgramHelper;
20
import net.bmahe.genetics4j.gp.spec.chromosome.ProgramTreeChromosomeSpec;
21
22
public class ProgramRandomPruneMutator implements Mutator {
23
24
	private final ProgramHelper programHelper;
25
	private final RandomGenerator randomGenerator;
26
	private final AbstractEAConfiguration eaConfiguration;
27
	private final double populationMutationProbability;
28
29
	public ProgramRandomPruneMutator(final ProgramHelper _programHelper,
30
			final RandomGenerator _randomGenerator,
31
			final AbstractEAConfiguration _eaConfiguration,
32
			final double populationMutationProbability) {
33
		Objects.requireNonNull(_programHelper);
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 programHelper → KILLED
		this.programHelper = _programHelper;
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<?>> duplicateAndCut(final Program program, final TreeNode<Operation<?>> root,
45
			final int cutPoint, final int nodeIndex) {
46
		Objects.requireNonNull(root);
47
		Validate.isTrue(cutPoint >= 0);
48
49 1 1. duplicateAndCut : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getData → KILLED
		final Operation<?> rootData = root.getData();
50
51 3 1. duplicateAndCut : removed conditional - replaced equality check with true → KILLED
2. duplicateAndCut : negated conditional → KILLED
3. duplicateAndCut : removed conditional - replaced equality check with false → KILLED
		if (nodeIndex == cutPoint) {
52 2 1. duplicateAndCut : removed call to net/bmahe/genetics4j/gp/Operation::returnedType → KILLED
2. duplicateAndCut : removed call to net/bmahe/genetics4j/gp/program/ProgramHelper::pickRandomTerminal → KILLED
			final OperationFactory randomTerminal = programHelper.pickRandomTerminal(program, rootData.returnedType());
53 2 1. duplicateAndCut : removed call to net/bmahe/genetics4j/gp/program/Program::inputSpec → SURVIVED
2. duplicateAndCut : removed call to net/bmahe/genetics4j/gp/OperationFactory::build → KILLED
			final Operation<?> operation = randomTerminal.build(program.inputSpec());
54 2 1. duplicateAndCut : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::<init> → KILLED
2. duplicateAndCut : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomPruneMutator::duplicateAndCut → KILLED
			return new TreeNode<Operation<?>>(operation);
55
		} else {
56 1 1. duplicateAndCut : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getChildren → KILLED
			final List<TreeNode<Operation<?>>> children = root.getChildren();
57
58 1 1. duplicateAndCut : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::<init> → KILLED
			final TreeNode<Operation<?>> duplicateRoot = new TreeNode<Operation<?>>(rootData);
59
60 2 1. duplicateAndCut : Replaced integer addition with subtraction → KILLED
2. duplicateAndCut : Substituted 1 with 0 → KILLED
			int currentIndex = nodeIndex + 1;
61 6 1. duplicateAndCut : removed conditional - replaced comparison check with true → KILLED
2. duplicateAndCut : removed call to java/util/List::size → KILLED
3. duplicateAndCut : Substituted 0 with 1 → KILLED
4. duplicateAndCut : removed conditional - replaced comparison check with false → KILLED
5. duplicateAndCut : negated conditional → KILLED
6. duplicateAndCut : changed conditional boundary → KILLED
			for (int i = 0; i < children.size(); i++) {
62 1 1. duplicateAndCut : removed call to java/util/List::get → KILLED
				final TreeNode<Operation<?>> treeNode = children.get(i);
63 1 1. duplicateAndCut : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getSize → KILLED
				final int childSize = treeNode.getSize();
64
65 2 1. duplicateAndCut : removed call to net/bmahe/genetics4j/gp/mutation/ProgramRandomPruneMutator::duplicateAndCut → KILLED
2. duplicateAndCut : replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRandomPruneMutator::duplicateAndCut with argument → KILLED
				final TreeNode<Operation<?>> childCopy = duplicateAndCut(program, treeNode, cutPoint, currentIndex);
66 1 1. duplicateAndCut : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::addChild → KILLED
				duplicateRoot.addChild(childCopy);
67 1 1. duplicateAndCut : Replaced integer addition with subtraction → KILLED
				currentIndex += childSize;
68
			}
69
70 1 1. duplicateAndCut : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomPruneMutator::duplicateAndCut → KILLED
			return duplicateRoot;
71
		}
72
	}
73
74
	@Override
75
	public Genotype mutate(final long generation, final Genotype original) {
76
		Validate.isTrue(generation >= 0);
77
		Objects.requireNonNull(original);
78
79 10 1. mutate : removed conditional - replaced comparison check with false → SURVIVED
2. mutate : changed conditional boundary → SURVIVED
3. mutate : removed conditional - replaced equality check with true → SURVIVED
4. mutate : removed call to java/util/random/RandomGenerator::nextDouble → SURVIVED
5. mutate : Substituted 1 with 0 → NO_COVERAGE
6. mutate : negated conditional → KILLED
7. mutate : negated conditional → KILLED
8. mutate : removed conditional - replaced equality check with false → KILLED
9. mutate : removed conditional - replaced comparison check with true → KILLED
10. mutate : Substituted 0 with 1 → KILLED
		if (randomGenerator.nextDouble() < populationMutationProbability == false) {
80 1 1. mutate : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRandomPruneMutator::mutate → KILLED
			return original;
81
		}
82
83 1 1. mutate : removed call to net/bmahe/genetics4j/core/Genotype::getSize → NO_COVERAGE
		final Chromosome[] newChromosomes = new Chromosome[original.getSize()];
84 1 1. mutate : removed call to net/bmahe/genetics4j/core/Genotype::getChromosomes → NO_COVERAGE
		final Chromosome[] chromosomes = original.getChromosomes();
85 5 1. mutate : Substituted 0 with 1 → 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 : negated conditional → NO_COVERAGE
5. mutate : changed conditional boundary → NO_COVERAGE
		for (int chromosomeIndex = 0; chromosomeIndex < chromosomes.length; chromosomeIndex++) {
86 1 1. mutate : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::getChromosomeSpec → NO_COVERAGE
			final ChromosomeSpec chromosomeSpec = eaConfiguration.getChromosomeSpec(chromosomeIndex);
87
			final Chromosome chromosome = chromosomes[chromosomeIndex];
88
89 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) {
90 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);
91
			}
92
93 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) {
94
				throw new IllegalArgumentException(
95 3 1. mutate : removed call to java/lang/Class::getSimpleName → NO_COVERAGE
2. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/Chromosome::getClass → NO_COVERAGE
3. mutate : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
						"This mutator does not support chromosome of type " + chromosome.getClass().getSimpleName());
96
			}
97
98
			final ProgramTreeChromosomeSpec programTreeChromosomeSpec = (ProgramTreeChromosomeSpec) chromosomeSpec;
99
100
			final TreeChromosome<Operation<?>> treeChromosome = (TreeChromosome<Operation<?>>) chromosome;
101 1 1. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::getSize → NO_COVERAGE
			final int chromosomeSize = treeChromosome.getSize();
102
103 5 1. mutate : removed conditional - replaced comparison check with true → NO_COVERAGE
2. mutate : Substituted 2 with 3 → NO_COVERAGE
3. mutate : removed conditional - replaced comparison check with false → NO_COVERAGE
4. mutate : negated conditional → NO_COVERAGE
5. mutate : changed conditional boundary → NO_COVERAGE
			if (chromosomeSize > 2) {
104 6 1. mutate : Substituted 1 with 0 → NO_COVERAGE
2. mutate : replaced call to java/util/random/RandomGenerator::nextInt with argument → NO_COVERAGE
3. mutate : removed call to java/util/random/RandomGenerator::nextInt → NO_COVERAGE
4. mutate : Replaced integer addition with subtraction → NO_COVERAGE
5. mutate : Replaced integer subtraction with addition → NO_COVERAGE
6. mutate : Substituted 1 with 0 → NO_COVERAGE
				final int cutPoint = randomGenerator.nextInt(chromosomeSize - 1) + 1;
105
106 1 1. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::getRoot → NO_COVERAGE
				final TreeNode<Operation<?>> root = treeChromosome.getRoot();
107 2 1. mutate : removed call to net/bmahe/genetics4j/gp/mutation/ProgramRandomPruneMutator::duplicateAndCut → NO_COVERAGE
2. mutate : replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRandomPruneMutator::duplicateAndCut with argument → NO_COVERAGE
				final TreeNode<Operation<?>> newRoot = duplicateAndCut(
108 2 1. mutate : Substituted 0 with 1 → NO_COVERAGE
2. mutate : removed call to net/bmahe/genetics4j/gp/spec/chromosome/ProgramTreeChromosomeSpec::program → NO_COVERAGE
						programTreeChromosomeSpec.program(),
109
							root,
110
							cutPoint,
111
							0);
112 1 1. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::<init> → NO_COVERAGE
				final TreeChromosome<Operation<?>> newTreeChromosome = new TreeChromosome<>(newRoot);
113
				newChromosomes[chromosomeIndex] = newTreeChromosome;
114
			} else {
115
				newChromosomes[chromosomeIndex] = chromosome;
116
			}
117
118
		}
119
120 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/ProgramRandomPruneMutator::mutate → NO_COVERAGE
		return new Genotype(newChromosomes);
121
	}
122
}

Mutations

38

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

39

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest]/[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

49

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

51

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

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

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

52

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

2.2
Location : duplicateAndCut
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/gp/program/ProgramHelper::pickRandomTerminal → KILLED

53

1.1
Location : duplicateAndCut
Killed by : none
removed call to net/bmahe/genetics4j/gp/program/Program::inputSpec → SURVIVED
Covering tests

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

54

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

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

56

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

58

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

60

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

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

61

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

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

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

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

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

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

62

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

63

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

65

1.1
Location : duplicateAndCut
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest]/[method:simple()]
removed call to net/bmahe/genetics4j/gp/mutation/ProgramRandomPruneMutator::duplicateAndCut → KILLED

2.2
Location : duplicateAndCut
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest]/[method:simple()]
replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRandomPruneMutator::duplicateAndCut with argument → KILLED

66

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

67

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

70

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

79

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

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

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

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

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

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

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

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

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

10.10
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRandomPruneMutatorTest]/[method:noMutate()]
Substituted 0 with 1 → KILLED

80

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

83

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

84

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

85

1.1
Location : mutate
Killed by : none
Substituted 0 with 1 → 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
negated conditional → NO_COVERAGE

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

86

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

89

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

90

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

93

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

95

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

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

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

101

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

103

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

2.2
Location : mutate
Killed by : none
Substituted 2 with 3 → 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
negated conditional → NO_COVERAGE

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

104

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

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

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

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

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

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

106

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

107

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

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

108

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

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

112

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/core/Genotype::<init> → NO_COVERAGE

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

Active mutators

Tests examined


Report generated by PIT 1.20.3