ProgramRulesApplicatorMutator.java

1
package net.bmahe.genetics4j.gp.mutation;
2
3
import java.util.ArrayList;
4
import java.util.List;
5
import java.util.Objects;
6
import java.util.Optional;
7
8
import org.apache.commons.lang3.Validate;
9
import org.apache.logging.log4j.LogManager;
10
import org.apache.logging.log4j.Logger;
11
12
import net.bmahe.genetics4j.core.Genotype;
13
import net.bmahe.genetics4j.core.chromosomes.Chromosome;
14
import net.bmahe.genetics4j.core.chromosomes.TreeChromosome;
15
import net.bmahe.genetics4j.core.chromosomes.TreeNode;
16
import net.bmahe.genetics4j.core.mutation.Mutator;
17
import net.bmahe.genetics4j.core.spec.AbstractEAConfiguration;
18
import net.bmahe.genetics4j.core.spec.chromosome.ChromosomeSpec;
19
import net.bmahe.genetics4j.gp.Operation;
20
import net.bmahe.genetics4j.gp.program.Program;
21
import net.bmahe.genetics4j.gp.spec.chromosome.ProgramTreeChromosomeSpec;
22
import net.bmahe.genetics4j.gp.spec.mutation.Rule;
23
import net.bmahe.genetics4j.gp.utils.TreeNodeUtils;
24
25
public class ProgramRulesApplicatorMutator implements Mutator {
26
	final static public Logger logger = LogManager.getLogger(ProgramRulesApplicatorMutator.class);
27
28
	private final List<Rule> rules;
29
	private final AbstractEAConfiguration eaConfiguration;
30
31
	public ProgramRulesApplicatorMutator(final List<Rule> _rules, final AbstractEAConfiguration _eaConfiguration) {
32
		Objects.requireNonNull(_rules);
33
		Validate.isTrue(_rules.isEmpty() == false);
34
		Objects.requireNonNull(_eaConfiguration);
35
36 1 1. <init> : Removed assignment to member variable rules → KILLED
		this.rules = _rules;
37 1 1. <init> : Removed assignment to member variable eaConfiguration → KILLED
		this.eaConfiguration = _eaConfiguration;
38
	}
39
40
	protected TreeNode<Operation<?>> duplicateAndApplyRule(final Program program, final TreeNode<Operation<?>> root) {
41
		Objects.requireNonNull(root);
42
43
		logger.trace("A - {}", TreeNodeUtils.toStringTreeNode(root));
44
45 1 1. duplicateAndApplyRule : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getData → KILLED
		final Operation<?> rootOperation = root.getData();
46 1 1. duplicateAndApplyRule : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::getChildren → KILLED
		final List<TreeNode<Operation<?>>> children = root.getChildren();
47
48 1 1. duplicateAndApplyRule : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::<init> → KILLED
		TreeNode<Operation<?>> currentRoot = new TreeNode<Operation<?>>(rootOperation);
49
50 5 1. duplicateAndApplyRule : changed conditional boundary → KILLED
2. duplicateAndApplyRule : removed conditional - replaced comparison check with false → KILLED
3. duplicateAndApplyRule : removed call to java/util/List::size → KILLED
4. duplicateAndApplyRule : negated conditional → KILLED
5. duplicateAndApplyRule : removed conditional - replaced comparison check with true → KILLED
		if (children.size() > 0) {
51 1 1. duplicateAndApplyRule : removed call to java/util/ArrayList::<init> → KILLED
			final List<TreeNode<Operation<?>>> newChildren = new ArrayList<>();
52 6 1. duplicateAndApplyRule : removed conditional - replaced comparison check with false → KILLED
2. duplicateAndApplyRule : Substituted 0 with 1 → KILLED
3. duplicateAndApplyRule : removed conditional - replaced comparison check with true → KILLED
4. duplicateAndApplyRule : changed conditional boundary → KILLED
5. duplicateAndApplyRule : negated conditional → KILLED
6. duplicateAndApplyRule : removed call to java/util/List::size → KILLED
			for (int i = 0; i < children.size(); i++) {
53 1 1. duplicateAndApplyRule : removed call to java/util/List::get → KILLED
				final TreeNode<Operation<?>> childNode = children.get(i);
54
55 2 1. duplicateAndApplyRule : replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule with argument → KILLED
2. duplicateAndApplyRule : removed call to net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule → KILLED
				final TreeNode<Operation<?>> childCopy = duplicateAndApplyRule(program, childNode);
56 1 1. duplicateAndApplyRule : removed call to java/util/List::add → KILLED
				newChildren.add(childCopy);
57
58
			}
59 1 1. duplicateAndApplyRule : removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::addChildren → KILLED
			currentRoot.addChildren(newChildren);
60
		}
61
62 1 1. duplicateAndApplyRule : Substituted 0 with 1 → KILLED
		boolean done = false;
63 3 1. duplicateAndApplyRule : removed conditional - replaced equality check with true → TIMED_OUT
2. duplicateAndApplyRule : negated conditional → KILLED
3. duplicateAndApplyRule : removed conditional - replaced equality check with false → KILLED
		while (done == false) {
64
			final TreeNode<Operation<?>> localRoot = currentRoot;
65
66
			logger.trace("B - {}", TreeNodeUtils.toStringTreeNode(localRoot));
67
68 1 1. duplicateAndApplyRule : removed call to java/util/List::stream → KILLED
			final Optional<Rule> applicableRule = rules.stream()
69 5 1. duplicateAndApplyRule : replaced call to java/util/stream/Stream::filter with receiver → KILLED
2. lambda$duplicateAndApplyRule$0 : replaced boolean return with true for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$0 → KILLED
3. lambda$duplicateAndApplyRule$0 : removed call to net/bmahe/genetics4j/gp/spec/mutation/Rule::test → KILLED
4. lambda$duplicateAndApplyRule$0 : replaced boolean return with false for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$0 → KILLED
5. duplicateAndApplyRule : removed call to java/util/stream/Stream::filter → KILLED
					.filter((rule) -> rule.test(localRoot))
70 1 1. duplicateAndApplyRule : removed call to java/util/stream/Stream::findFirst → KILLED
					.findFirst();
71 5 1. duplicateAndApplyRule : removed call to java/util/Optional::map → KILLED
2. lambda$duplicateAndApplyRule$1 : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$1 → KILLED
3. lambda$duplicateAndApplyRule$1 : replaced call to net/bmahe/genetics4j/gp/spec/mutation/Rule::apply with argument → KILLED
4. duplicateAndApplyRule : replaced call to java/util/Optional::map with receiver → KILLED
5. lambda$duplicateAndApplyRule$1 : removed call to net/bmahe/genetics4j/gp/spec/mutation/Rule::apply → KILLED
			final Optional<TreeNode<Operation<?>>> newRootOpt = applicableRule.map(x -> x.apply(program, localRoot));
72
73 7 1. lambda$duplicateAndApplyRule$2 : removed call to java/lang/Boolean::valueOf → SURVIVED
2. lambda$duplicateAndApplyRule$2 : replaced Boolean return with True for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$2 → SURVIVED
3. lambda$duplicateAndApplyRule$2 : replaced Boolean return with False for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$2 → SURVIVED
4. lambda$duplicateAndApplyRule$2 : removed call to net/bmahe/genetics4j/gp/utils/TreeNodeUtils::areSame → SURVIVED
5. duplicateAndApplyRule : Substituted 1 with 0 → TIMED_OUT
6. duplicateAndApplyRule : removed call to java/util/Optional::map → KILLED
7. duplicateAndApplyRule : replaced call to java/util/Optional::map with receiver → KILLED
			done = newRootOpt.map(newRoot -> TreeNodeUtils.areSame(newRoot, localRoot))
74 4 1. duplicateAndApplyRule : replaced call to java/util/Optional::orElse with argument → SURVIVED
2. duplicateAndApplyRule : removed call to java/lang/Boolean::booleanValue → TIMED_OUT
3. duplicateAndApplyRule : removed call to java/util/Optional::orElse → KILLED
4. duplicateAndApplyRule : removed call to java/lang/Boolean::valueOf → KILLED
					.orElse(true);
75
76 4 1. duplicateAndApplyRule : removed conditional - replaced equality check with false → TIMED_OUT
2. duplicateAndApplyRule : removed call to java/util/Optional::isPresent → TIMED_OUT
3. duplicateAndApplyRule : removed conditional - replaced equality check with true → KILLED
4. duplicateAndApplyRule : negated conditional → KILLED
			if (newRootOpt.isPresent()) {
77 1 1. duplicateAndApplyRule : removed call to java/util/Optional::get → KILLED
				currentRoot = newRootOpt.get();
78
			}
79
		}
80
81 1 1. duplicateAndApplyRule : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule → KILLED
		return currentRoot;
82
	}
83
84
	@Override
85
	public Genotype mutate(final long generation, final Genotype original) {
86
		Objects.requireNonNull(original);
87
88
		logger.trace("Mutating genotype: {}", original);
89
90 1 1. mutate : removed call to net/bmahe/genetics4j/core/Genotype::getSize → KILLED
		final Chromosome[] newChromosomes = new Chromosome[original.getSize()];
91 1 1. mutate : removed call to net/bmahe/genetics4j/core/Genotype::getChromosomes → KILLED
		final Chromosome[] chromosomes = original.getChromosomes();
92 5 1. mutate : Substituted 0 with 1 → KILLED
2. mutate : removed conditional - replaced comparison check with true → KILLED
3. mutate : negated conditional → KILLED
4. mutate : changed conditional boundary → KILLED
5. mutate : removed conditional - replaced comparison check with false → KILLED
		for (int chromosomeIndex = 0; chromosomeIndex < chromosomes.length; chromosomeIndex++) {
93 1 1. mutate : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::getChromosomeSpec → KILLED
			final ChromosomeSpec chromosomeSpec = eaConfiguration.getChromosomeSpec(chromosomeIndex);
94
			final Chromosome chromosome = chromosomes[chromosomeIndex];
95
96 3 1. mutate : removed conditional - replaced equality check with false → SURVIVED
2. mutate : removed conditional - replaced equality check with true → KILLED
3. mutate : negated conditional → KILLED
			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 → SURVIVED
2. mutate : negated conditional → KILLED
3. mutate : removed conditional - replaced equality check with true → KILLED
			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/Class::getSimpleName → NO_COVERAGE
2. mutate : removed call to java/lang/IllegalArgumentException::<init> → 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::getRoot → KILLED
			final TreeNode<Operation<?>> root = treeChromosome.getRoot();
110
111
			if (logger.isTraceEnabled()) {
112
				logger.trace("Original chromosome {} - {}", chromosomeIndex, TreeNodeUtils.toStringTreeNode(root));
113
			}
114
115 3 1. mutate : replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule with argument → KILLED
2. mutate : removed call to net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule → KILLED
3. mutate : removed call to net/bmahe/genetics4j/gp/spec/chromosome/ProgramTreeChromosomeSpec::program → KILLED
			final TreeNode<Operation<?>> newRoot = duplicateAndApplyRule(programTreeChromosomeSpec.program(), root);
116 1 1. mutate : removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::<init> → KILLED
			final TreeChromosome<Operation<?>> newTreeChromosome = new TreeChromosome<>(newRoot);
117
			newChromosomes[chromosomeIndex] = newTreeChromosome;
118
119
		}
120
121 2 1. mutate : replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::mutate → KILLED
2. mutate : removed call to net/bmahe/genetics4j/core/Genotype::<init> → KILLED
		return new Genotype(newChromosomes);
122
	}
123
}

Mutations

36

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

37

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

45

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

46

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

48

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

50

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

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

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

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

5.5
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed conditional - replaced comparison check with true → KILLED

51

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/ArrayList::<init> → KILLED

52

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed conditional - replaced comparison check with false → KILLED

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

3.3
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed conditional - replaced comparison check with true → KILLED

4.4
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
changed conditional boundary → KILLED

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

6.6
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/List::size → KILLED

53

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

55

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule with argument → KILLED

2.2
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule → KILLED

56

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/List::add → KILLED

59

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to net/bmahe/genetics4j/core/chromosomes/TreeNode::addChildren → KILLED

62

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
Substituted 0 with 1 → KILLED

63

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

2.2
Location : duplicateAndApplyRule
Killed by : none
removed conditional - replaced equality check with true → TIMED_OUT

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

68

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/List::stream → KILLED

69

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
replaced call to java/util/stream/Stream::filter with receiver → KILLED

2.2
Location : lambda$duplicateAndApplyRule$0
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
replaced boolean return with true for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$0 → KILLED

3.3
Location : lambda$duplicateAndApplyRule$0
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to net/bmahe/genetics4j/gp/spec/mutation/Rule::test → KILLED

4.4
Location : lambda$duplicateAndApplyRule$0
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
replaced boolean return with false for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$0 → KILLED

5.5
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/stream/Stream::filter → KILLED

70

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/stream/Stream::findFirst → KILLED

71

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/Optional::map → KILLED

2.2
Location : lambda$duplicateAndApplyRule$1
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$1 → KILLED

3.3
Location : lambda$duplicateAndApplyRule$1
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
replaced call to net/bmahe/genetics4j/gp/spec/mutation/Rule::apply with argument → KILLED

4.4
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
replaced call to java/util/Optional::map with receiver → KILLED

5.5
Location : lambda$duplicateAndApplyRule$1
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to net/bmahe/genetics4j/gp/spec/mutation/Rule::apply → KILLED

73

1.1
Location : lambda$duplicateAndApplyRule$2
Killed by : none
removed call to java/lang/Boolean::valueOf → SURVIVED
Covering tests

2.2
Location : duplicateAndApplyRule
Killed by : none
Substituted 1 with 0 → TIMED_OUT

3.3
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/Optional::map → KILLED

4.4
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
replaced call to java/util/Optional::map with receiver → KILLED

5.5
Location : lambda$duplicateAndApplyRule$2
Killed by : none
replaced Boolean return with True for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$2 → SURVIVED Covering tests

6.6
Location : lambda$duplicateAndApplyRule$2
Killed by : none
replaced Boolean return with False for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$2 → SURVIVED Covering tests

7.7
Location : lambda$duplicateAndApplyRule$2
Killed by : none
removed call to net/bmahe/genetics4j/gp/utils/TreeNodeUtils::areSame → SURVIVED Covering tests

74

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/Optional::orElse → KILLED

2.2
Location : duplicateAndApplyRule
Killed by : none
replaced call to java/util/Optional::orElse with argument → SURVIVED
Covering tests

3.3
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/lang/Boolean::valueOf → KILLED

4.4
Location : duplicateAndApplyRule
Killed by : none
removed call to java/lang/Boolean::booleanValue → TIMED_OUT

76

1.1
Location : duplicateAndApplyRule
Killed by : none
removed conditional - replaced equality check with false → TIMED_OUT

2.2
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed conditional - replaced equality check with true → KILLED

3.3
Location : duplicateAndApplyRule
Killed by : none
removed call to java/util/Optional::isPresent → TIMED_OUT

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

77

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
removed call to java/util/Optional::get → KILLED

81

1.1
Location : duplicateAndApplyRule
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:dupplicateAndApplyWithOneApplicableRule()]
replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule → KILLED

90

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateNoApplicableRule()]
removed call to net/bmahe/genetics4j/core/Genotype::getSize → KILLED

91

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateNoApplicableRule()]
removed call to net/bmahe/genetics4j/core/Genotype::getChromosomes → KILLED

92

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

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

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

4.4
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateNoApplicableRule()]
changed conditional boundary → KILLED

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

93

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateNoApplicableRule()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::getChromosomeSpec → KILLED

96

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

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

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

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 : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateNoApplicableRule()]
negated conditional → KILLED

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateNoApplicableRule()]
removed conditional - replaced equality check with true → KILLED

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

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/Class::getSimpleName → NO_COVERAGE

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

109

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateNoApplicableRule()]
removed call to net/bmahe/genetics4j/core/chromosomes/TreeChromosome::getRoot → KILLED

115

1.1
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateWithOneApplicableRule()]
replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule with argument → KILLED

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateNoApplicableRule()]
removed call to net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule → KILLED

3.3
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateWithOneApplicableRule()]
removed call to net/bmahe/genetics4j/gp/spec/chromosome/ProgramTreeChromosomeSpec::program → KILLED

116

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

121

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

2.2
Location : mutate
Killed by : net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.gp.mutation.ProgramRulesApplicatorMutatorTest]/[method:mutateNoApplicableRule()]
removed call to net/bmahe/genetics4j/core/Genotype::<init> → KILLED

Active mutators

Tests examined


Report generated by PIT 1.20.3