ProgramRulesApplicatorMutator.java

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

Mutations

35

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

36

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

44

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

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::getChildren → KILLED

47

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

49

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

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()]
removed call to java/util/ArrayList::<init> → 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 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

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 call to java/util/List::get → KILLED

54

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

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()]
removed call to java/util/List::add → KILLED

58

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

61

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

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

67

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

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 java/util/stream/Stream::findFirst → 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()]
replaced boolean return with true for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::lambda$duplicateAndApplyRule$0 → 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()]
removed call to net/bmahe/genetics4j/gp/spec/mutation/Rule::test → 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

6.6
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

7.7
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

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/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

70

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

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

3.3
Location : duplicateAndApplyRule
Killed by : none
Substituted 1 with 0 → 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()]
removed call to java/util/Optional::map → 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()]
replaced call to java/util/Optional::map with receiver → 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/Optional::orElse → KILLED

7.7
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

8.8
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

9.9
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

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

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

72

1.1
Location : duplicateAndApplyRule
Killed by : none
removed call to java/util/Optional::isPresent → 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()]
negated conditional → KILLED

3.3
Location : duplicateAndApplyRule
Killed by : none
removed conditional - replaced equality check with false → 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()]
removed conditional - replaced equality check with true → KILLED

73

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

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()]
replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule → KILLED

86

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

87

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

88

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 comparison check with true → 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()]
negated conditional → 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()]
Substituted 0 with 1 → 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

89

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

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()]
removed conditional - replaced equality check with true → 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()]
negated conditional → KILLED

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

93

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/String::valueOf → NO_COVERAGE

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()]
negated conditional → 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()]
removed conditional - replaced equality check with true → KILLED

98

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

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

104

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

110

1.1
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

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()]
replaced call to net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::duplicateAndApplyRule with argument → KILLED

111

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

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/Genotype::<init> → 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()]
replaced return value with null for net/bmahe/genetics4j/gp/mutation/ProgramRulesApplicatorMutator::mutate → KILLED

Active mutators

Tests examined


Report generated by PIT 1.19.6