ListTree.java

1
package org.europa.together.application;
2
3
import java.util.ArrayList;
4
import java.util.List;
5
import org.europa.together.business.Logger;
6
import org.europa.together.business.TreeWalker;
7
import org.europa.together.domain.LogLevel;
8
import org.europa.together.domain.TreeNode;
9
import org.europa.together.exceptions.MisconfigurationException;
10
import org.europa.together.utils.StringUtils;
11
import org.springframework.stereotype.Repository;
12
13
/**
14
 * Implementation of a TreeWalker.
15
 *
16
 * @param <T> define the TreeType
17
 */
18
@Repository
19
public class ListTree<T> implements TreeWalker<T> {
20
21
    private static final long serialVersionUID = 9L;
22
    private static final Logger LOGGER = new LogbackLogger(ListTree.class);
23
24
    private List<TreeNode<T>> tree = new ArrayList<>();
25
    private String rootUuid;
26
27
    /**
28
     * Constructor.
29
     */
30
    public ListTree() {
31
        LOGGER.log("instance class", LogLevel.INFO);
32
    }
33
34
    /**
35
     * Constructor.
36
     *
37
     * @param root as TreeNode
38
     */
39
    public ListTree(final TreeNode<T> root) {
40
        addRoot(root);
41
        LOGGER.log("instance class (" + root.getNodeName() + ")", LogLevel.INFO);
42
    }
43
44
    @Override
45
    public final boolean addRoot(final TreeNode<T> root) {
46
        boolean success = false;
47 1 1. addRoot : negated conditional → KILLED
        if (StringUtils.isEmpty(rootUuid)) {
48
            this.rootUuid = root.getUuid();
49 1 1. addRoot : removed call to org/europa/together/domain/TreeNode::setParent → KILLED
            root.setParent("-1");
50
            tree.add(root);
51
            success = true;
52
            LOGGER.log("ROOT: [" + this.rootUuid + "] added.", LogLevel.DEBUG);
53
        } else {
54
            LOGGER.log("Root node [" + this.rootUuid + "] for this tree already exist.",
55
                    LogLevel.WARN);
56
        }
57 2 1. addRoot : replaced boolean return with true for org/europa/together/application/ListTree::addRoot → KILLED
2. addRoot : replaced boolean return with false for org/europa/together/application/ListTree::addRoot → KILLED
        return success;
58
    }
59
60
    @Override
61
    public boolean isElementOfTree(final TreeNode<T> node) {
62
        boolean success = false;
63 1 1. isElementOfTree : negated conditional → KILLED
        if (!tree.isEmpty()) {
64
            for (TreeNode<T> element : this.tree) {
65 1 1. isElementOfTree : negated conditional → SURVIVED
                if (node.equals(element)) {
66
                    success = true;
67
                }
68
            }
69
        } else {
70
            LOGGER.log("Operation not possible, because Tree is empty.", LogLevel.WARN);
71
        }
72 2 1. isElementOfTree : replaced boolean return with false for org/europa/together/application/ListTree::isElementOfTree → KILLED
2. isElementOfTree : replaced boolean return with true for org/europa/together/application/ListTree::isElementOfTree → KILLED
        return success;
73
    }
74
75
    @Override
76
    public boolean isEmpty() {
77 2 1. isEmpty : replaced boolean return with true for org/europa/together/application/ListTree::isEmpty → KILLED
2. isEmpty : replaced boolean return with false for org/europa/together/application/ListTree::isEmpty → KILLED
        return tree.isEmpty();
78
    }
79
80
    @Override
81
    public boolean isLeaf(final TreeNode<T> leaf) {
82
        boolean isLeaf = false;
83 1 1. isLeaf : negated conditional → KILLED
        if (!tree.isEmpty()) {
84
            boolean hasParent = false;
85
            for (TreeNode<T> check : this.tree) {
86 1 1. isLeaf : negated conditional → KILLED
                if (leaf.getUuid().equals(check.getParent())) {
87
                    hasParent = true;
88
                    break;
89
                }
90
            }
91 1 1. isLeaf : negated conditional → KILLED
            if (!hasParent) {
92
                isLeaf = true;
93
            }
94
        } else {
95
            LOGGER.log("Operation not possible, because Tree is empty.", LogLevel.WARN);
96
        }
97 2 1. isLeaf : replaced boolean return with false for org/europa/together/application/ListTree::isLeaf → KILLED
2. isLeaf : replaced boolean return with true for org/europa/together/application/ListTree::isLeaf → KILLED
        return isLeaf;
98
    }
99
100
    @Override
101
    public boolean removeNode(final TreeNode<T> node) {
102
        boolean success = false;
103 1 1. removeNode : negated conditional → KILLED
        if (this.isLeaf(node)) {
104
            this.tree.remove(node);
105
            success = true;
106
            LOGGER.log("Node " + node.getNodeName() + " removed.", LogLevel.DEBUG);
107
        } else {
108
            LOGGER.log("Node " + node.getNodeName()
109
                    + " can't removed. First you need to remove all childe node(s)",
110
                    LogLevel.WARN);
111
        }
112 2 1. removeNode : replaced boolean return with false for org/europa/together/application/ListTree::removeNode → SURVIVED
2. removeNode : replaced boolean return with true for org/europa/together/application/ListTree::removeNode → KILLED
        return success;
113
    }
114
115
    @Override
116
    public int countNodes() {
117 1 1. countNodes : replaced int return with 0 for org/europa/together/application/ListTree::countNodes → KILLED
        return this.tree.size();
118
    }
119
120
    @Override
121
    public int isNameUnique(final String nodeName) {
122
        int count = 0;
123 1 1. isNameUnique : negated conditional → KILLED
        if (!tree.isEmpty()) {
124
            for (TreeNode<T> node : this.tree) {
125 1 1. isNameUnique : negated conditional → KILLED
                if (node.getNodeName().equals(nodeName)) {
126 1 1. isNameUnique : Changed increment from 1 to -1 → KILLED
                    count++;
127
                }
128
            }
129
        } else {
130
            LOGGER.log("Operation not possible, because Tree is empty.", LogLevel.WARN);
131
        }
132 1 1. isNameUnique : replaced int return with 0 for org/europa/together/application/ListTree::isNameUnique → KILLED
        return count;
133
    }
134
135
    @Override
136
    public List<TreeNode<T>> getElementByName(final String nodeName) {
137
        List<TreeNode<T>> elements = new ArrayList<>();
138 1 1. getElementByName : negated conditional → KILLED
        if (!tree.isEmpty()) {
139
            for (TreeNode<T> node : this.tree) {
140 1 1. getElementByName : negated conditional → KILLED
                if (node.getNodeName().equals(nodeName)) {
141
                    elements.add(node);
142
                }
143
            }
144
145 1 1. getElementByName : negated conditional → SURVIVED
            if (elements.isEmpty()) {
146
                LOGGER.log("No Node(s) with the name " + nodeName + " found.", LogLevel.DEBUG);
147
            }
148
        } else {
149
            LOGGER.log("Operation not possible, because Tree is empty.", LogLevel.WARN);
150
        }
151 1 1. getElementByName : replaced return value with Collections.emptyList for org/europa/together/application/ListTree::getElementByName → KILLED
        return elements;
152
    }
153
154
    @Override
155
    public List<TreeNode<T>> getLeafs() {
156
        List<TreeNode<T>> leafs = new ArrayList<>();
157
        for (TreeNode<T> node : tree) {
158 1 1. getLeafs : negated conditional → KILLED
            if (isLeaf(node)) {
159
                leafs.add(node);
160
            }
161
        }
162
        LOGGER.log(leafs.size() + " Leaf Nodes in the tree detected.", LogLevel.DEBUG);
163 1 1. getLeafs : replaced return value with Collections.emptyList for org/europa/together/application/ListTree::getLeafs → KILLED
        return leafs;
164
    }
165
166
    @Override
167
    public List<TreeNode<T>> getTree() {
168 1 1. getTree : replaced return value with Collections.emptyList for org/europa/together/application/ListTree::getTree → KILLED
        return List.copyOf(tree);
169
    }
170
171
    @Override
172
    public TreeNode<T> getNodeByUuid(final String uuid) {
173
        TreeNode<T> search = null;
174 1 1. getNodeByUuid : negated conditional → KILLED
        if (!tree.isEmpty()) {
175
            for (TreeNode<T> node : this.tree) {
176 1 1. getNodeByUuid : negated conditional → KILLED
                if (node.getUuid().equals(uuid)) {
177
                    search = node;
178
                    break;
179
                }
180
            }
181
        } else {
182
            LOGGER.log("Operation not possible, because Tree is empty.", LogLevel.WARN);
183
        }
184 1 1. getNodeByUuid : replaced return value with null for org/europa/together/application/ListTree::getNodeByUuid → KILLED
        return search;
185
    }
186
187
    @Override
188
    public TreeNode<T> getRoot() {
189
        TreeNode<T> root = null;
190 1 1. getRoot : negated conditional → KILLED
        if (this.rootUuid != null) {
191
            for (TreeNode<T> node : this.tree) {
192 1 1. getRoot : negated conditional → KILLED
                if (node.getUuid().equals(this.rootUuid)) {
193
                    root = node;
194
                }
195
            }
196
        }
197 1 1. getRoot : replaced return value with null for org/europa/together/application/ListTree::getRoot → KILLED
        return root;
198
    }
199
200
    @Override
201
    public boolean addNode(final TreeNode<T> node) {
202
        boolean add = true;
203 1 1. addNode : negated conditional → KILLED
        if (node != null) {
204
            for (TreeNode<T> check : this.tree) {
205 1 1. addNode : negated conditional → KILLED
                if (node.getUuid().equals(check.getUuid())) {
206
                    LOGGER.log("Node with this UUID already exist.", LogLevel.WARN);
207
                    add = false;
208
                    break;
209
                }
210 1 1. addNode : negated conditional → KILLED
                if (!StringUtils.isEmpty(node.getParent())
211 1 1. addNode : negated conditional → KILLED
                        && node.getParent().equals(check.getParent())
212 1 1. addNode : negated conditional → KILLED
                        && node.getNodeName().equals(check.getNodeName())) {
213
                    LOGGER.log("Node with same name AND parent  already exist.",
214
                            LogLevel.WARN);
215
                    add = false;
216
                    break;
217
                }
218
            }
219 1 1. addNode : negated conditional → KILLED
            if (add) {
220
                tree.add(node);
221
                LOGGER.log("Node [" + node.getNodeName() + "] added.",
222
                        LogLevel.DEBUG);
223
            }
224
        } else {
225
            add = false;
226
        }
227 2 1. addNode : replaced boolean return with true for org/europa/together/application/ListTree::addNode → KILLED
2. addNode : replaced boolean return with false for org/europa/together/application/ListTree::addNode → KILLED
        return add;
228
    }
229
230
    @Override
231
    public void clear() {
232 1 1. clear : removed call to java/util/List::clear → KILLED
        this.tree.clear();
233
        this.rootUuid = "";
234
        LOGGER.log("Tree successful reseted.", LogLevel.TRACE);
235
    }
236
237
    @Override
238
    public void prune(final TreeNode<T> cutNode) throws MisconfigurationException {
239
        List<TreeNode<T>> stack = new ArrayList<>();
240
        stack.addAll(tree);
241
242
        LOGGER.log("Cut Tree by Node "
243
                + cutNode.getNodeName() + " ["
244
                + cutNode.getUuid() + "]", LogLevel.DEBUG);
245
246 1 1. prune : negated conditional → KILLED
        if (stack.isEmpty()) {
247
            throw new MisconfigurationException("prune: tree is empty nothing to do");
248 1 1. prune : negated conditional → KILLED
        } else if (cutNode.equals(getRoot())) {
249
            LOGGER.log("Node to prune is ROOT - delee Tree", LogLevel.DEBUG);
250 1 1. prune : removed call to org/europa/together/application/ListTree::clear → KILLED
            clear();
251 1 1. prune : negated conditional → KILLED
        } else if (isLeaf(cutNode)) {
252
            LOGGER.log("Node to prune is a LEAF - remove(leaf)", LogLevel.DEBUG);
253
            removeNode(cutNode);
254
        } else {
255
            TreeNode<T> node = cutNode;
256
            List<TreeNode<T>> helper = new ArrayList<>();
257
            List<TreeNode<T>> cutted = new ArrayList<>();
258
            cutted.add(node);
259 2 1. prune : changed conditional boundary → SURVIVED
2. prune : negated conditional → KILLED
            for (int i = 0; i < tree.size(); i++) {
260
                for (TreeNode<T> compare : stack) {
261 1 1. prune : negated conditional → KILLED
                    if (i != 0) {
262
                        node = compare;
263
                    }
264 2 1. prune : changed conditional boundary → SURVIVED
2. prune : negated conditional → KILLED
                    for (int j = 0; j < tree.size(); j++) {
265 1 1. prune : negated conditional → KILLED
                        if (node.getUuid().equals(compare.getUuid())) {
266
                            cutted.add(compare);
267 1 1. prune : negated conditional → KILLED
                            if (!isLeaf(compare)) {
268
                                helper.add(compare);
269
                            }
270
                            break;
271
                        }
272
                    }
273
                }
274 1 1. prune : negated conditional → KILLED
                if (!helper.isEmpty()) {
275 1 1. prune : removed call to java/util/List::clear → KILLED
                    stack.clear();
276
                    for (TreeNode<T> compare : helper) {
277
                        for (TreeNode<T> element : this.tree) {
278 1 1. prune : negated conditional → TIMED_OUT
                            if (compare.getUuid().equals(element.getParent())) {
279
                                stack.add(element);
280
                            }
281
                        }
282
                    }
283
                    cutted.addAll(stack);
284 1 1. prune : removed call to java/util/List::clear → SURVIVED
                    helper.clear();
285
                } else {
286
                    break;
287
                }
288
            }
289
            for (TreeNode<T> item : cutted) {
290
                this.tree.remove(item);
291
            }
292
        }
293
    }
294
295
    @Override
296
    public void merge(final String parentUuid, final TreeWalker<T> appendingTree) {
297 2 1. merge : negated conditional → KILLED
2. merge : negated conditional → KILLED
        if (appendingTree != null && !appendingTree.isEmpty()) {
298
            TreeNode<T> appendingRoot = appendingTree.getRoot();
299 1 1. merge : removed call to org/europa/together/domain/TreeNode::setParent → SURVIVED
            appendingRoot.setParent(parentUuid);
300
            List<TreeNode<T>> newTree = new ArrayList<>();
301
            newTree.addAll(appendingTree.getTree());
302
            this.tree.addAll(newTree);
303
            LOGGER.log("Append " + newTree.size()
304
                    + " Nodes to the new Tree.", LogLevel.DEBUG);
305
        } else {
306
            LOGGER.log("Merging tree is empty - no merge applied.", LogLevel.DEBUG);
307
        }
308
    }
309
310
    @Override
311
    public boolean validateTree(final List<TreeNode<T>> collection)
312
            throws MisconfigurationException {
313
        boolean isTree = false;
314
        int marker = 0;
315
        int counter = 0;
316
        int root = 0;
317 1 1. validateTree : negated conditional → KILLED
        if (!collection.isEmpty()) {
318 1 1. validateTree : Replaced integer subtraction with addition → KILLED
            marker = collection.size() - 1;
319
            List<TreeNode<T>> comperator = new ArrayList<>();
320
            comperator.addAll(collection);
321
            for (TreeNode<T> node : collection) {
322 1 1. validateTree : negated conditional → KILLED
                if (StringUtils.isEmpty(node.getParent())) {
323 1 1. validateTree : Changed increment from 1 to -1 → SURVIVED
                    counter++;
324
                    LOGGER.log("Element with empty parent: " + node.getNodeName(), LogLevel.DEBUG);
325
                }
326 2 1. validateTree : negated conditional → KILLED
2. validateTree : negated conditional → KILLED
                if (!StringUtils.isEmpty(node.getParent()) && node.getParent().equals("-1")) {
327 1 1. validateTree : Changed increment from 1 to -1 → KILLED
                    root++;
328
                    LOGGER.log("ROOT element: " + node.getNodeName(), LogLevel.DEBUG);
329
                }
330
                for (TreeNode<T> element : comperator) {
331 1 1. validateTree : negated conditional → KILLED
                    if (!StringUtils.isEmpty(node.getParent())
332 1 1. validateTree : negated conditional → KILLED
                            && !node.getParent().equals("-1")
333 1 1. validateTree : negated conditional → KILLED
                            && !element.equals(node)
334 1 1. validateTree : negated conditional → KILLED
                            && element.getUuid().equals(node.getParent())) {
335 1 1. validateTree : Changed increment from -1 to 1 → KILLED
                        marker--;
336
                        LOGGER.log("Parent of (" + node.getNodeName() + ") : " + node.getUuid()
337
                                + " : (" + element.getNodeName() + ") " + element.getParent(),
338
                                LogLevel.DEBUG);
339
                    }
340
                }
341
            }
342
        }
343 1 1. validateTree : negated conditional → SURVIVED
        if (root == 0) {
344
            LOGGER.log("Tree has no ROOT element.", LogLevel.DEBUG);
345 2 1. validateTree : changed conditional boundary → SURVIVED
2. validateTree : negated conditional → SURVIVED
        } else if (root > 1) {
346
            LOGGER.log("Tree has muliple ROOT elements.", LogLevel.DEBUG);
347
        }
348 1 1. validateTree : negated conditional → SURVIVED
        if (marker != 0) {
349
            LOGGER.log("Tree has " + marker + " disconnected Elemets.", LogLevel.DEBUG);
350
        }
351 3 1. validateTree : negated conditional → KILLED
2. validateTree : negated conditional → KILLED
3. validateTree : negated conditional → KILLED
        if (counter == 0
352
                && root == 1
353
                && marker == 0) {
354
            isTree = true;
355
        }
356 2 1. validateTree : replaced boolean return with false for org/europa/together/application/ListTree::validateTree → KILLED
2. validateTree : replaced boolean return with true for org/europa/together/application/ListTree::validateTree → KILLED
        return isTree;
357
    }
358
359
    @Override
360
    public String toString() {
361
        StringBuilder out = new StringBuilder();
362
        out.append("TreeWalkerImpl{\n")
363
                .append("\t Root: ")
364
                .append(getRoot().getNodeName())
365
                .append("\n")
366
                .append("\t Nodes: ")
367
                .append(tree.size())
368
                .append("\n TREE >>>\n");
369
        for (TreeNode<T> node : tree) {
370
            out.append("\t")
371
                    .append(node.toString())
372
                    .append("\n");
373
        }
374
        out.append("}");
375 1 1. toString : replaced return value with "" for org/europa/together/application/ListTree::toString → SURVIVED
        return out.toString();
376
    }
377
}

Mutations

47

1.1
Location : addRoot
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:addRoot()]
negated conditional → KILLED

49

1.1
Location : addRoot
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:getRoot()]
removed call to org/europa/together/domain/TreeNode::setParent → KILLED

57

1.1
Location : addRoot
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddRootTwice()]
replaced boolean return with true for org/europa/together/application/ListTree::addRoot → KILLED

2.2
Location : addRoot
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameNameAndParent()]
replaced boolean return with false for org/europa/together/application/ListTree::addRoot → KILLED

63

1.1
Location : isElementOfTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:isNodeElementOfTree()]
negated conditional → KILLED

65

1.1
Location : isElementOfTree
Killed by : none
negated conditional → SURVIVED
Covering tests

72

1.1
Location : isElementOfTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:isNodeElementOfTree()]
replaced boolean return with false for org/europa/together/application/ListTree::isElementOfTree → KILLED

2.2
Location : isElementOfTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failNodeIsElementOfTree()]
replaced boolean return with true for org/europa/together/application/ListTree::isElementOfTree → KILLED

77

1.1
Location : isEmpty
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:merge()]
replaced boolean return with true for org/europa/together/application/ListTree::isEmpty → KILLED

2.2
Location : isEmpty
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failMerge()]
replaced boolean return with false for org/europa/together/application/ListTree::isEmpty → KILLED

83

1.1
Location : isLeaf
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failIsLeafByEmptyTree()]
negated conditional → KILLED

86

1.1
Location : isLeaf
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:isLeaf()]
negated conditional → KILLED

91

1.1
Location : isLeaf
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failRemoveNode()]
negated conditional → KILLED

97

1.1
Location : isLeaf
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:isLeaf()]
replaced boolean return with false for org/europa/together/application/ListTree::isLeaf → KILLED

2.2
Location : isLeaf
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failIsLeafByEmptyTree()]
replaced boolean return with true for org/europa/together/application/ListTree::isLeaf → KILLED

103

1.1
Location : removeNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failRemoveNode()]
negated conditional → KILLED

112

1.1
Location : removeNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failRemoveNode()]
replaced boolean return with true for org/europa/together/application/ListTree::removeNode → KILLED

2.2
Location : removeNode
Killed by : none
replaced boolean return with false for org/europa/together/application/ListTree::removeNode → SURVIVED
Covering tests

117

1.1
Location : countNodes
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameNameAndParent()]
replaced int return with 0 for org/europa/together/application/ListTree::countNodes → KILLED

123

1.1
Location : isNameUnique
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:isNameUnique()]
negated conditional → KILLED

125

1.1
Location : isNameUnique
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:isNameUnique()]
negated conditional → KILLED

126

1.1
Location : isNameUnique
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:isNameUnique()]
Changed increment from 1 to -1 → KILLED

132

1.1
Location : isNameUnique
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:isNameUnique()]
replaced int return with 0 for org/europa/together/application/ListTree::isNameUnique → KILLED

138

1.1
Location : getElementByName
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:addNode()]
negated conditional → KILLED

140

1.1
Location : getElementByName
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:getElementByNameNotExist()]
negated conditional → KILLED

145

1.1
Location : getElementByName
Killed by : none
negated conditional → SURVIVED
Covering tests

151

1.1
Location : getElementByName
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:addNode()]
replaced return value with Collections.emptyList for org/europa/together/application/ListTree::getElementByName → KILLED

158

1.1
Location : getLeafs
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:getLeafCount()]
negated conditional → KILLED

163

1.1
Location : getLeafs
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:getLeafCount()]
replaced return value with Collections.emptyList for org/europa/together/application/ListTree::getLeafs → KILLED

168

1.1
Location : getTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failRemoveNode()]
replaced return value with Collections.emptyList for org/europa/together/application/ListTree::getTree → KILLED

174

1.1
Location : getNodeByUuid
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:getNodeByUuid()]
negated conditional → KILLED

176

1.1
Location : getNodeByUuid
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failGetNodeByUuidByUuidNotExist()]
negated conditional → KILLED

184

1.1
Location : getNodeByUuid
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:getNodeByUuid()]
replaced return value with null for org/europa/together/application/ListTree::getNodeByUuid → KILLED

190

1.1
Location : getRoot
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:addRoot()]
negated conditional → KILLED

192

1.1
Location : getRoot
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:addRoot()]
negated conditional → KILLED

197

1.1
Location : getRoot
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:addRoot()]
replaced return value with null for org/europa/together/application/ListTree::getRoot → KILLED

203

1.1
Location : addNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameUuid()]
negated conditional → KILLED

205

1.1
Location : addNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameUuid()]
negated conditional → KILLED

210

1.1
Location : addNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameNameAndParent()]
negated conditional → KILLED

211

1.1
Location : addNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameNameAndParent()]
negated conditional → KILLED

212

1.1
Location : addNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameNameAndParent()]
negated conditional → KILLED

219

1.1
Location : addNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameUuid()]
negated conditional → KILLED

227

1.1
Location : addNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameUuid()]
replaced boolean return with true for org/europa/together/application/ListTree::addNode → KILLED

2.2
Location : addNode
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failAddNodeOfSameUuid()]
replaced boolean return with false for org/europa/together/application/ListTree::addNode → KILLED

232

1.1
Location : clear
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:countNodes()]
removed call to java/util/List::clear → KILLED

246

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failPruneByEmptyTree()]
negated conditional → KILLED

248

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:pruneLeaf()]
negated conditional → KILLED

250

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:pruneRoot()]
removed call to org/europa/together/application/ListTree::clear → KILLED

251

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:prune()]
negated conditional → KILLED

259

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:prune()]
negated conditional → KILLED

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

261

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:prune()]
negated conditional → KILLED

264

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:prune()]
negated conditional → KILLED

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

265

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:prune()]
negated conditional → KILLED

267

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:prune()]
negated conditional → KILLED

274

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:prune()]
negated conditional → KILLED

275

1.1
Location : prune
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:prune()]
removed call to java/util/List::clear → KILLED

278

1.1
Location : prune
Killed by : none
negated conditional → TIMED_OUT

284

1.1
Location : prune
Killed by : none
removed call to java/util/List::clear → SURVIVED
Covering tests

297

1.1
Location : merge
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failMerge()]
negated conditional → KILLED

2.2
Location : merge
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failMerge()]
negated conditional → KILLED

299

1.1
Location : merge
Killed by : none
removed call to org/europa/together/domain/TreeNode::setParent → SURVIVED
Covering tests

317

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
negated conditional → KILLED

318

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
Replaced integer subtraction with addition → KILLED

322

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
negated conditional → KILLED

323

1.1
Location : validateTree
Killed by : none
Changed increment from 1 to -1 → SURVIVED
Covering tests

326

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failValidateTreeHasNoRoot()]
negated conditional → KILLED

2.2
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
negated conditional → KILLED

327

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
Changed increment from 1 to -1 → KILLED

331

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failValidateTreeHasNoRoot()]
negated conditional → KILLED

332

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
negated conditional → KILLED

333

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
negated conditional → KILLED

334

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
negated conditional → KILLED

335

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
Changed increment from -1 to 1 → KILLED

343

1.1
Location : validateTree
Killed by : none
negated conditional → SURVIVED
Covering tests

345

1.1
Location : validateTree
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

2.2
Location : validateTree
Killed by : none
negated conditional → SURVIVED Covering tests

348

1.1
Location : validateTree
Killed by : none
negated conditional → SURVIVED
Covering tests

351

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failValidateByEmptyTree()]
negated conditional → KILLED

2.2
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
negated conditional → KILLED

3.3
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
negated conditional → KILLED

356

1.1
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:passValidateTree()]
replaced boolean return with false for org/europa/together/application/ListTree::validateTree → KILLED

2.2
Location : validateTree
Killed by : org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failValidateByEmptyTree()]
replaced boolean return with true for org/europa/together/application/ListTree::validateTree → KILLED

375

1.1
Location : toString
Killed by : none
replaced return value with "" for org/europa/together/application/ListTree::toString → SURVIVED
Covering tests

Active mutators

Tests examined


Report generated by PIT 1.22.0