NodeIdManager.java

1
package net.bmahe.genetics4j.neat;
2
3
import java.util.Collection;
4
import java.util.Objects;
5
import java.util.Set;
6
import java.util.concurrent.ConcurrentHashMap;
7
import java.util.concurrent.atomic.AtomicLong;
8
9
import org.apache.commons.lang3.Validate;
10
11
import net.bmahe.genetics4j.neat.spec.NeatNodeLayout;
12
13
/**
14
 * Allocates collision-safe hidden-node IDs for one semantic node layout.
15
 *
16
 * <p>A manager is intended to be shared by every chromosome in an evolving population. It tracks IDs already present
17
 * in chromosomes and assigns one stable hidden-node ID to each ancestral connection innovation that is split by an
18
 * add-node mutation. Consequently, homologous mutations receive the same node ID even when they occur in different
19
 * genomes.
20
 *
21
 * <p>Allocation and registration methods are synchronized so a manager can safely be used by concurrent mutation
22
 * workers. IDs are drawn exclusively from the layout's hidden-node range and exhaustion is reported with an
23
 * {@link IllegalStateException}.
24
 *
25
 * @see NodeIdManagerRegistry
26
 * @see InnovationManager
27
 */
28
public class NodeIdManager {
29
30
	private final NeatNodeLayout nodeLayout;
31
	private final AtomicLong nextNodeId;
32 2 1. <init> : Removed assignment to member variable allocatedNodeIds → KILLED
2. <init> : removed call to java/util/concurrent/ConcurrentHashMap::newKeySet → KILLED
	private final Set<Integer> allocatedNodeIds = ConcurrentHashMap.newKeySet();
33 2 1. <init> : removed call to java/util/concurrent/ConcurrentHashMap::<init> → KILLED
2. <init> : Removed assignment to member variable splitNodeIds → KILLED
	private final ConcurrentHashMap<Integer, Integer> splitNodeIds = new ConcurrentHashMap<>();
34 2 1. <init> : Removed assignment to member variable splitInnovationsByNodeId → KILLED
2. <init> : removed call to java/util/concurrent/ConcurrentHashMap::<init> → KILLED
	private final ConcurrentHashMap<Integer, Integer> splitInnovationsByNodeId = new ConcurrentHashMap<>();
35
36
	/**
37
	 * Creates a manager for one node layout.
38
	 *
39
	 * @param _nodeLayout layout defining the external IDs and hidden-node range
40
	 * @throws NullPointerException if {@code _nodeLayout} is {@code null}
41
	 */
42
	public NodeIdManager(final NeatNodeLayout _nodeLayout) {
43
		nodeLayout = Objects.requireNonNull(_nodeLayout);
44 3 1. <init> : Removed assignment to member variable nextNodeId → KILLED
2. <init> : removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::hiddenNodeIdStartInclusive → KILLED
3. <init> : removed call to java/util/concurrent/atomic/AtomicLong::<init> → KILLED
		nextNodeId = new AtomicLong(nodeLayout.hiddenNodeIdStartInclusive());
45
	}
46
47
	/**
48
	 * Returns the hidden-node ID associated with splitting an ancestral connection.
49
	 *
50
	 * <p>The first call allocates an ID; subsequent calls with the same innovation return that ID.
51
	 *
52
	 * @param connectionInnovation non-negative connection innovation number
53
	 * @return the stable hidden-node ID for the split
54
	 * @throws IllegalArgumentException if the innovation number is negative
55
	 * @throws IllegalStateException    if the hidden-node range is exhausted
56
	 */
57
	public synchronized int nodeIdForSplit(final int connectionInnovation) {
58
		Validate.isTrue(connectionInnovation >= 0, "Connection innovation must be non-negative");
59 5 1. nodeIdForSplit : removed call to java/util/concurrent/ConcurrentHashMap::computeIfAbsent → KILLED
2. nodeIdForSplit : removed call to java/lang/Integer::valueOf → KILLED
3. nodeIdForSplit : replaced int return with 0 for net/bmahe/genetics4j/neat/NodeIdManager::nodeIdForSplit → KILLED
4. nodeIdForSplit : replaced call to java/util/concurrent/ConcurrentHashMap::computeIfAbsent with argument → KILLED
5. nodeIdForSplit : removed call to java/lang/Integer::intValue → KILLED
		return splitNodeIds.computeIfAbsent(connectionInnovation, ignored -> {
60 1 1. lambda$nodeIdForSplit$0 : removed call to net/bmahe/genetics4j/neat/NodeIdManager::allocateNodeId → KILLED
			final int nodeId = allocateNodeId();
61 4 1. lambda$nodeIdForSplit$0 : replaced call to java/util/concurrent/ConcurrentHashMap::put with argument → SURVIVED
2. lambda$nodeIdForSplit$0 : removed call to java/util/concurrent/ConcurrentHashMap::put → SURVIVED
3. lambda$nodeIdForSplit$0 : removed call to java/lang/Integer::valueOf → KILLED
4. lambda$nodeIdForSplit$0 : removed call to java/lang/Integer::valueOf → KILLED
			splitInnovationsByNodeId.put(nodeId, connectionInnovation);
62 2 1. lambda$nodeIdForSplit$0 : removed call to java/lang/Integer::valueOf → KILLED
2. lambda$nodeIdForSplit$0 : replaced Integer return value with 0 for net/bmahe/genetics4j/neat/NodeIdManager::lambda$nodeIdForSplit$0 → KILLED
			return nodeId;
63
		});
64
	}
65
66
	/**
67
	 * Registers node IDs already present in a chromosome before new IDs are allocated.
68
	 *
69
	 * <p>External IDs are accepted but do not consume hidden-node allocation slots. Every other ID must belong to the
70
	 * layout's hidden-node range.
71
	 *
72
	 * @param nodeIds IDs referenced by an existing chromosome
73
	 * @throws NullPointerException     if the collection or one of its elements is {@code null}
74
	 * @throws IllegalArgumentException if an ID is outside the layout namespaces
75
	 */
76
	public synchronized void registerExistingNodeIds(final Collection<Integer> nodeIds) {
77
		Objects.requireNonNull(nodeIds);
78
		for (final Integer nodeId : nodeIds) {
79
			Objects.requireNonNull(nodeId);
80 5 1. registerExistingNodeIds : removed conditional - replaced equality check with true → KILLED
2. registerExistingNodeIds : negated conditional → KILLED
3. registerExistingNodeIds : removed call to java/lang/Integer::intValue → KILLED
4. registerExistingNodeIds : removed conditional - replaced equality check with false → KILLED
5. registerExistingNodeIds : removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::isExternal → KILLED
			if (nodeLayout.isExternal(nodeId) == false) {
81
				Validate.isTrue(nodeLayout.isHidden(nodeId), "Node ID %d is outside the layout namespaces", nodeId);
82 1 1. registerExistingNodeIds : removed call to java/util/Set::add → KILLED
				allocatedNodeIds.add(nodeId);
83
			}
84
		}
85
	}
86
87
	/**
88
	 * Registers a known relationship between an ancestral connection and an existing hidden node.
89
	 *
90
	 * @param connectionInnovation non-negative connection innovation number
91
	 * @param nodeId               hidden-node ID assigned to the split
92
	 * @throws IllegalArgumentException if the ID is outside the hidden range or either value conflicts with a previous
93
	 *                                  registration
94
	 */
95
	public synchronized void registerSplit(final int connectionInnovation, final int nodeId) {
96
		Validate.isTrue(connectionInnovation >= 0, "Connection innovation must be non-negative");
97
		Validate.isTrue(nodeLayout.isHidden(nodeId), "Node ID %d is outside the hidden-node range", nodeId);
98 3 1. registerSplit : removed call to java/util/concurrent/ConcurrentHashMap::get → NO_COVERAGE
2. registerSplit : replaced call to java/util/concurrent/ConcurrentHashMap::get with argument → NO_COVERAGE
3. registerSplit : removed call to java/lang/Integer::valueOf → NO_COVERAGE
		final Integer existing = splitNodeIds.get(connectionInnovation);
99 7 1. registerSplit : removed call to java/lang/Integer::intValue → NO_COVERAGE
2. registerSplit : removed conditional - replaced equality check with false → NO_COVERAGE
3. registerSplit : removed conditional - replaced equality check with false → NO_COVERAGE
4. registerSplit : negated conditional → NO_COVERAGE
5. registerSplit : negated conditional → NO_COVERAGE
6. registerSplit : removed conditional - replaced equality check with true → NO_COVERAGE
7. registerSplit : removed conditional - replaced equality check with true → NO_COVERAGE
		if (existing != null && existing != nodeId) {
100 2 1. registerSplit : Substituted 2 with 3 → NO_COVERAGE
2. registerSplit : Substituted 0 with 1 → NO_COVERAGE
			throw new IllegalArgumentException("Connection innovation %d is already mapped to hidden node %d"
101 5 1. registerSplit : Substituted 1 with 0 → NO_COVERAGE
2. registerSplit : removed call to java/lang/String::formatted → NO_COVERAGE
3. registerSplit : replaced call to java/lang/String::formatted with receiver → NO_COVERAGE
4. registerSplit : removed call to java/lang/Integer::valueOf → NO_COVERAGE
5. registerSplit : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
					.formatted(connectionInnovation, existing));
102
		}
103 3 1. registerSplit : replaced call to java/util/concurrent/ConcurrentHashMap::get with argument → NO_COVERAGE
2. registerSplit : removed call to java/lang/Integer::valueOf → NO_COVERAGE
3. registerSplit : removed call to java/util/concurrent/ConcurrentHashMap::get → NO_COVERAGE
		final Integer existingInnovation = splitInnovationsByNodeId.get(nodeId);
104 7 1. registerSplit : removed conditional - replaced equality check with false → NO_COVERAGE
2. registerSplit : removed conditional - replaced equality check with false → NO_COVERAGE
3. registerSplit : removed conditional - replaced equality check with true → NO_COVERAGE
4. registerSplit : removed call to java/lang/Integer::intValue → NO_COVERAGE
5. registerSplit : removed conditional - replaced equality check with true → NO_COVERAGE
6. registerSplit : negated conditional → NO_COVERAGE
7. registerSplit : negated conditional → NO_COVERAGE
		if (existingInnovation != null && existingInnovation != connectionInnovation) {
105 2 1. registerSplit : Substituted 2 with 3 → NO_COVERAGE
2. registerSplit : Substituted 0 with 1 → NO_COVERAGE
			throw new IllegalArgumentException(
106 5 1. registerSplit : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
2. registerSplit : removed call to java/lang/Integer::valueOf → NO_COVERAGE
3. registerSplit : Substituted 1 with 0 → NO_COVERAGE
4. registerSplit : removed call to java/lang/String::formatted → NO_COVERAGE
5. registerSplit : replaced call to java/lang/String::formatted with receiver → NO_COVERAGE
					"Hidden node ID %d is already mapped to connection innovation %d".formatted(nodeId, existingInnovation));
107
		}
108 4 1. registerSplit : removed call to java/lang/Integer::valueOf → NO_COVERAGE
2. registerSplit : removed call to java/util/concurrent/ConcurrentHashMap::put → NO_COVERAGE
3. registerSplit : replaced call to java/util/concurrent/ConcurrentHashMap::put with argument → NO_COVERAGE
4. registerSplit : removed call to java/lang/Integer::valueOf → NO_COVERAGE
		splitNodeIds.put(connectionInnovation, nodeId);
109 4 1. registerSplit : removed call to java/lang/Integer::valueOf → NO_COVERAGE
2. registerSplit : removed call to java/lang/Integer::valueOf → NO_COVERAGE
3. registerSplit : removed call to java/util/concurrent/ConcurrentHashMap::put → NO_COVERAGE
4. registerSplit : replaced call to java/util/concurrent/ConcurrentHashMap::put with argument → NO_COVERAGE
		splitInnovationsByNodeId.put(nodeId, connectionInnovation);
110 2 1. registerSplit : removed call to java/lang/Integer::valueOf → NO_COVERAGE
2. registerSplit : removed call to java/util/Set::add → NO_COVERAGE
		allocatedNodeIds.add(nodeId);
111
	}
112
113
	private int allocateNodeId() {
114
		while (true) {
115 1 1. allocateNodeId : removed call to java/util/concurrent/atomic/AtomicLong::getAndIncrement → KILLED
			final long candidate = nextNodeId.getAndIncrement();
116 5 1. allocateNodeId : changed conditional boundary → KILLED
2. allocateNodeId : negated conditional → KILLED
3. allocateNodeId : removed conditional - replaced comparison check with true → KILLED
4. allocateNodeId : removed conditional - replaced comparison check with false → KILLED
5. allocateNodeId : removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::hiddenNodeIdEndExclusive → KILLED
			if (candidate >= nodeLayout.hiddenNodeIdEndExclusive()) {
117 2 1. allocateNodeId : Substituted 0 with 1 → SURVIVED
2. allocateNodeId : Substituted 2 with 3 → SURVIVED
				throw new IllegalStateException("Hidden-node ID range [%d, %d) is exhausted"
118 8 1. allocateNodeId : removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::hiddenNodeIdEndExclusive → SURVIVED
2. allocateNodeId : Substituted 1 with 0 → SURVIVED
3. allocateNodeId : removed call to java/lang/Long::valueOf → SURVIVED
4. allocateNodeId : removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::hiddenNodeIdStartInclusive → SURVIVED
5. allocateNodeId : removed call to java/lang/Long::valueOf → SURVIVED
6. allocateNodeId : replaced call to java/lang/String::formatted with receiver → SURVIVED
7. allocateNodeId : removed call to java/lang/String::formatted → SURVIVED
8. allocateNodeId : removed call to java/lang/IllegalStateException::<init> → KILLED
						.formatted(nodeLayout.hiddenNodeIdStartInclusive(), nodeLayout.hiddenNodeIdEndExclusive()));
119
			}
120 1 1. allocateNodeId : removed call to java/lang/Math::toIntExact → KILLED
			final int nodeId = Math.toIntExact(candidate);
121 5 1. allocateNodeId : removed conditional - replaced equality check with false → KILLED
2. allocateNodeId : removed conditional - replaced equality check with true → KILLED
3. allocateNodeId : removed call to java/lang/Integer::valueOf → KILLED
4. allocateNodeId : removed call to java/util/Set::add → KILLED
5. allocateNodeId : negated conditional → KILLED
			if (allocatedNodeIds.add(nodeId)) {
122 1 1. allocateNodeId : replaced int return with 0 for net/bmahe/genetics4j/neat/NodeIdManager::allocateNodeId → KILLED
				return nodeId;
123
			}
124
		}
125
	}
126
}

Mutations

32

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
Removed assignment to member variable allocatedNodeIds → KILLED

2.2
Location : <init>
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/util/concurrent/ConcurrentHashMap::newKeySet → KILLED

33

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/util/concurrent/ConcurrentHashMap::<init> → KILLED

2.2
Location : <init>
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
Removed assignment to member variable splitNodeIds → KILLED

34

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
Removed assignment to member variable splitInnovationsByNodeId → KILLED

2.2
Location : <init>
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/util/concurrent/ConcurrentHashMap::<init> → KILLED

44

1.1
Location : <init>
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
Removed assignment to member variable nextNodeId → KILLED

2.2
Location : <init>
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::hiddenNodeIdStartInclusive → KILLED

3.3
Location : <init>
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/util/concurrent/atomic/AtomicLong::<init> → KILLED

59

1.1
Location : nodeIdForSplit
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/util/concurrent/ConcurrentHashMap::computeIfAbsent → KILLED

2.2
Location : nodeIdForSplit
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/lang/Integer::valueOf → KILLED

3.3
Location : nodeIdForSplit
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
replaced int return with 0 for net/bmahe/genetics4j/neat/NodeIdManager::nodeIdForSplit → KILLED

4.4
Location : nodeIdForSplit
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
replaced call to java/util/concurrent/ConcurrentHashMap::computeIfAbsent with argument → KILLED

5.5
Location : nodeIdForSplit
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/lang/Integer::intValue → KILLED

60

1.1
Location : lambda$nodeIdForSplit$0
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to net/bmahe/genetics4j/neat/NodeIdManager::allocateNodeId → KILLED

61

1.1
Location : lambda$nodeIdForSplit$0
Killed by : none
replaced call to java/util/concurrent/ConcurrentHashMap::put with argument → SURVIVED
Covering tests

2.2
Location : lambda$nodeIdForSplit$0
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/lang/Integer::valueOf → KILLED

3.3
Location : lambda$nodeIdForSplit$0
Killed by : none
removed call to java/util/concurrent/ConcurrentHashMap::put → SURVIVED Covering tests

4.4
Location : lambda$nodeIdForSplit$0
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/lang/Integer::valueOf → KILLED

62

1.1
Location : lambda$nodeIdForSplit$0
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/lang/Integer::valueOf → KILLED

2.2
Location : lambda$nodeIdForSplit$0
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
replaced Integer return value with 0 for net/bmahe/genetics4j/neat/NodeIdManager::lambda$nodeIdForSplit$0 → KILLED

80

1.1
Location : registerExistingNodeIds
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.SparseStructuralMutationTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.SparseStructuralMutationTest]/[method:homologousSplitsAcrossChromosomesReuseHiddenNodeId()]
removed conditional - replaced equality check with true → KILLED

2.2
Location : registerExistingNodeIds
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
negated conditional → KILLED

3.3
Location : registerExistingNodeIds
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.SparseStructuralMutationTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.SparseStructuralMutationTest]/[method:homologousSplitsAcrossChromosomesReuseHiddenNodeId()]
removed call to java/lang/Integer::intValue → KILLED

4.4
Location : registerExistingNodeIds
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed conditional - replaced equality check with false → KILLED

5.5
Location : registerExistingNodeIds
Killed by : net.bmahe.genetics4j.neat.mutation.chromosome.SparseStructuralMutationTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.chromosome.SparseStructuralMutationTest]/[method:homologousSplitsAcrossChromosomesReuseHiddenNodeId()]
removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::isExternal → KILLED

82

1.1
Location : registerExistingNodeIds
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/util/Set::add → KILLED

98

1.1
Location : registerSplit
Killed by : none
removed call to java/util/concurrent/ConcurrentHashMap::get → NO_COVERAGE

2.2
Location : registerSplit
Killed by : none
replaced call to java/util/concurrent/ConcurrentHashMap::get with argument → NO_COVERAGE

3.3
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

99

1.1
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::intValue → NO_COVERAGE

2.2
Location : registerSplit
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

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

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

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

6.6
Location : registerSplit
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

7.7
Location : registerSplit
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

100

1.1
Location : registerSplit
Killed by : none
Substituted 2 with 3 → NO_COVERAGE

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

101

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

2.2
Location : registerSplit
Killed by : none
removed call to java/lang/String::formatted → NO_COVERAGE

3.3
Location : registerSplit
Killed by : none
replaced call to java/lang/String::formatted with receiver → NO_COVERAGE

4.4
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

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

103

1.1
Location : registerSplit
Killed by : none
replaced call to java/util/concurrent/ConcurrentHashMap::get with argument → NO_COVERAGE

2.2
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

3.3
Location : registerSplit
Killed by : none
removed call to java/util/concurrent/ConcurrentHashMap::get → NO_COVERAGE

104

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

2.2
Location : registerSplit
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

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

4.4
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::intValue → NO_COVERAGE

5.5
Location : registerSplit
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

6.6
Location : registerSplit
Killed by : none
negated conditional → NO_COVERAGE

7.7
Location : registerSplit
Killed by : none
negated conditional → NO_COVERAGE

105

1.1
Location : registerSplit
Killed by : none
Substituted 2 with 3 → NO_COVERAGE

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

106

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

2.2
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

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

4.4
Location : registerSplit
Killed by : none
removed call to java/lang/String::formatted → NO_COVERAGE

5.5
Location : registerSplit
Killed by : none
replaced call to java/lang/String::formatted with receiver → NO_COVERAGE

108

1.1
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

2.2
Location : registerSplit
Killed by : none
removed call to java/util/concurrent/ConcurrentHashMap::put → NO_COVERAGE

3.3
Location : registerSplit
Killed by : none
replaced call to java/util/concurrent/ConcurrentHashMap::put with argument → NO_COVERAGE

4.4
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

109

1.1
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

2.2
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

3.3
Location : registerSplit
Killed by : none
removed call to java/util/concurrent/ConcurrentHashMap::put → NO_COVERAGE

4.4
Location : registerSplit
Killed by : none
replaced call to java/util/concurrent/ConcurrentHashMap::put with argument → NO_COVERAGE

110

1.1
Location : registerSplit
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

2.2
Location : registerSplit
Killed by : none
removed call to java/util/Set::add → NO_COVERAGE

115

1.1
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/util/concurrent/atomic/AtomicLong::getAndIncrement → KILLED

116

1.1
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
changed conditional boundary → KILLED

2.2
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
negated conditional → KILLED

3.3
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed conditional - replaced comparison check with true → KILLED

4.4
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed conditional - replaced comparison check with false → KILLED

5.5
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::hiddenNodeIdEndExclusive → KILLED

117

1.1
Location : allocateNodeId
Killed by : none
Substituted 0 with 1 → SURVIVED
Covering tests

2.2
Location : allocateNodeId
Killed by : none
Substituted 2 with 3 → SURVIVED Covering tests

118

1.1
Location : allocateNodeId
Killed by : none
removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::hiddenNodeIdEndExclusive → SURVIVED
Covering tests

2.2
Location : allocateNodeId
Killed by : none
Substituted 1 with 0 → SURVIVED Covering tests

3.3
Location : allocateNodeId
Killed by : none
removed call to java/lang/Long::valueOf → SURVIVED Covering tests

4.4
Location : allocateNodeId
Killed by : none
removed call to net/bmahe/genetics4j/neat/spec/NeatNodeLayout::hiddenNodeIdStartInclusive → SURVIVED Covering tests

5.5
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/lang/IllegalStateException::<init> → KILLED

6.6
Location : allocateNodeId
Killed by : none
removed call to java/lang/Long::valueOf → SURVIVED Covering tests

7.7
Location : allocateNodeId
Killed by : none
replaced call to java/lang/String::formatted with receiver → SURVIVED Covering tests

8.8
Location : allocateNodeId
Killed by : none
removed call to java/lang/String::formatted → SURVIVED Covering tests

120

1.1
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/lang/Math::toIntExact → KILLED

121

1.1
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed conditional - replaced equality check with false → KILLED

2.2
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed conditional - replaced equality check with true → KILLED

3.3
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/lang/Integer::valueOf → KILLED

4.4
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
removed call to java/util/Set::add → KILLED

5.5
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
negated conditional → KILLED

122

1.1
Location : allocateNodeId
Killed by : net.bmahe.genetics4j.neat.NodeIdManagerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.NodeIdManagerTest]/[method:skipsExistingIdsAndReportsExhaustion()]
replaced int return with 0 for net/bmahe/genetics4j/neat/NodeIdManager::allocateNodeId → KILLED

Active mutators

Tests examined


Report generated by PIT 1.25.7 support