CommentProcessorRegistry.java

1
package pro.verron.officestamper.core;
2
3
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
4
import org.docx4j.wml.*;
5
import org.jvnet.jaxb2_commons.ppp.Child;
6
import org.slf4j.Logger;
7
import org.slf4j.LoggerFactory;
8
import org.springframework.expression.spel.SpelEvaluationException;
9
import org.springframework.expression.spel.SpelParseException;
10
import pro.verron.officestamper.api.*;
11
import pro.verron.officestamper.utils.WmlFactory;
12
import pro.verron.officestamper.utils.WmlUtils;
13
14
import java.math.BigInteger;
15
import java.util.*;
16
17
import static pro.verron.officestamper.core.Placeholders.findProcessors;
18
19
/**
20
 * Allows registration of {@link CommentProcessor} objects. Each registered
21
 * ICommentProcessor must implement an interface which has to be specified at
22
 * registration time. Provides several getter methods to access the registered
23
 * {@link CommentProcessor}.
24
 *
25
 * @author Joseph Verron
26
 * @author Tom Hombergs
27
 * @version ${version}
28
 * @since 1.0.0
29
 */
30
public class CommentProcessorRegistry {
31
32
    private static final Logger logger = LoggerFactory.getLogger(CommentProcessorRegistry.class);
33
    private final DocxPart source;
34
    private final CommentProcessors commentProcessors;
35
    private final ExpressionResolver expressionResolver;
36
    private final ExceptionResolver exceptionResolver;
37
38
    /**
39
     * Constructs a new CommentProcessorRegistry.
40
     *
41
     * @param source             the source part of the Word document.
42
     * @param expressionResolver the resolver for evaluating expressions.
43
     * @param commentProcessors  map of comment processor instances keyed by their respective class types.
44
     * @param exceptionResolver  the resolver for handling exceptions during processing.
45
     */
46
    public CommentProcessorRegistry(
47
            DocxPart source,
48
            ExpressionResolver expressionResolver,
49
            CommentProcessors commentProcessors,
50
            ExceptionResolver exceptionResolver
51
    ) {
52
        this.source = source;
53
        this.expressionResolver = expressionResolver;
54
        this.commentProcessors = commentProcessors;
55
        this.exceptionResolver = exceptionResolver;
56
    }
57
58
    public <T> void runProcessors(T expressionContext) {
59
        var proceedComments = new ArrayList<Comment>();
60
61
        source.streamRun()
62 1 1. runProcessors : removed call to java/util/stream/Stream::forEach → KILLED
              .forEach(run -> {
63
                  var comments = collectComments();
64
                  var runParent = StandardParagraph.from(source, (P) run.getParent());
65
                  var optional = runProcessorsOnRunComment(comments, expressionContext, run, runParent);
66 1 1. lambda$runProcessors$0 : removed call to pro/verron/officestamper/core/CommentProcessors::commitChanges → SURVIVED
                  commentProcessors.commitChanges(source);
67 1 1. lambda$runProcessors$0 : removed call to java/util/Optional::ifPresent → SURVIVED
                  optional.ifPresent(proceedComments::add);
68
              });
69
70
        // we run the paragraph afterward so that the comments inside work before the whole paragraph comments
71
        source.streamParagraphs()
72 1 1. runProcessors : removed call to java/util/stream/Stream::forEach → KILLED
              .forEach(p -> {
73
                  var comments = collectComments();
74
                  var paragraphComment = p.getComment();
75 1 1. lambda$runProcessors$2 : removed call to java/util/Optional::ifPresent → KILLED
                  paragraphComment.ifPresent((pc -> {
76
                      var optional = runProcessorsOnParagraphComment(comments, expressionContext, p, pc.getId());
77 1 1. lambda$runProcessors$1 : removed call to pro/verron/officestamper/core/CommentProcessors::commitChanges → KILLED
                      commentProcessors.commitChanges(source);
78 1 1. lambda$runProcessors$1 : removed call to java/util/Optional::ifPresent → KILLED
                      optional.ifPresent(proceedComments::add);
79
                  }));
80
              });
81
82
        source.streamParagraphs()
83 2 1. runProcessors : removed call to java/util/stream/Stream::forEach → KILLED
2. lambda$runProcessors$3 : removed call to pro/verron/officestamper/core/CommentProcessorRegistry::runProcessorsOnInlineContent → KILLED
              .forEach(paragraph -> runProcessorsOnInlineContent(expressionContext, paragraph));
84
85 1 1. runProcessors : removed call to java/util/ArrayList::forEach → KILLED
        proceedComments.forEach(CommentUtil::deleteComment);
86
    }
87
88
    private Map<BigInteger, Comment> collectComments() {
89
        var rootComments = new HashMap<BigInteger, Comment>();
90
        var allComments = new HashMap<BigInteger, Comment>();
91
        var stack = Collections.asLifoQueue(new ArrayDeque<Comment>());
92
93
        var list = WmlUtils.extractCommentElements(document());
94
        for (Child commentElement : list) {
95 2 1. collectComments : removed call to pro/verron/officestamper/core/CommentProcessorRegistry::onRangeStart → KILLED
2. collectComments : negated conditional → KILLED
            if (commentElement instanceof CommentRangeStart crs) onRangeStart(crs, allComments, stack, rootComments);
96 2 1. collectComments : removed call to pro/verron/officestamper/core/CommentProcessorRegistry::onRangeEnd → KILLED
2. collectComments : negated conditional → KILLED
            else if (commentElement instanceof CommentRangeEnd cre) onRangeEnd(cre, allComments, stack);
97 2 1. collectComments : removed call to pro/verron/officestamper/core/CommentProcessorRegistry::onReference → KILLED
2. collectComments : negated conditional → KILLED
            else if (commentElement instanceof R.CommentReference cr) onReference(cr, allComments);
98
        }
99
        CommentUtil.getCommentsPart(document().getParts())
100
                   .map(CommentUtil::extractContent)
101
                   .map(Comments::getComment)
102
                   .stream()
103
                   .flatMap(Collection::stream)
104 2 1. lambda$collectComments$4 : replaced boolean return with true for pro/verron/officestamper/core/CommentProcessorRegistry::lambda$collectComments$4 → KILLED
2. lambda$collectComments$4 : replaced boolean return with false for pro/verron/officestamper/core/CommentProcessorRegistry::lambda$collectComments$4 → KILLED
                   .filter(comment -> allComments.containsKey(comment.getId()))
105 1 1. collectComments : removed call to java/util/stream/Stream::forEach → KILLED
                   .forEach(comment -> allComments.get(comment.getId())
106 1 1. lambda$collectComments$5 : removed call to pro/verron/officestamper/api/Comment::setComment → KILLED
                                                  .setComment(comment));
107 1 1. collectComments : replaced return value with Collections.emptyMap for pro/verron/officestamper/core/CommentProcessorRegistry::collectComments → KILLED
        return new HashMap<>(rootComments);
108
    }
109
110
    private <T> Optional<Comment> runProcessorsOnRunComment(
111
            Map<BigInteger, Comment> comments, T expressionContext, R run, Paragraph paragraph
112
    ) {
113 1 1. runProcessorsOnRunComment : replaced return value with Optional.empty for pro/verron/officestamper/core/CommentProcessorRegistry::runProcessorsOnRunComment → SURVIVED
        return CommentUtil.getCommentAround(run, document())
114 1 1. lambda$runProcessorsOnRunComment$6 : replaced return value with Optional.empty for pro/verron/officestamper/core/CommentProcessorRegistry::lambda$runProcessorsOnRunComment$6 → KILLED
                          .flatMap(c -> Optional.ofNullable(comments.get(c.getId())))
115
                          .flatMap(c -> {
116
                              var cPlaceholder = c.asPlaceholder();
117
                              var cComment = c.getComment();
118
                              comments.remove(cComment.getId());
119 1 1. lambda$runProcessorsOnRunComment$7 : removed call to pro/verron/officestamper/core/CommentProcessors::setContext → KILLED
                              commentProcessors.setContext(new ProcessorContext(paragraph, run, c, cPlaceholder));
120 1 1. lambda$runProcessorsOnRunComment$7 : negated conditional → KILLED
                              return runCommentProcessors(expressionContext, cPlaceholder)
121
                                      ? Optional.of(c)
122
                                      : Optional.empty();
123
124
                          });
125
    }
126
127
    /**
128
     * Takes the first comment on the specified paragraph and tries to evaluate
129
     * the string within the comment against all registered
130
     * {@link CommentProcessor}s.
131
     *
132
     * @param comments          the comments within the document.
133
     * @param expressionContext the context root object
134
     * @param <T>               the type of the context root object.
135
     */
136
    private <T> Optional<Comment> runProcessorsOnParagraphComment(
137
            Map<BigInteger, Comment> comments, T expressionContext, Paragraph paragraph, BigInteger paragraphCommentId
138
    ) {
139 1 1. runProcessorsOnParagraphComment : negated conditional → KILLED
        if (!comments.containsKey(paragraphCommentId)) return Optional.empty();
140
141
        var c = comments.get(paragraphCommentId);
142
        var cPlaceholder = c.asPlaceholder();
143
        var cComment = c.getComment();
144
        comments.remove(cComment.getId());
145 1 1. runProcessorsOnParagraphComment : removed call to pro/verron/officestamper/core/CommentProcessors::setContext → KILLED
        commentProcessors.setContext(new ProcessorContext(paragraph, null, c, cPlaceholder));
146 1 1. runProcessorsOnParagraphComment : negated conditional → KILLED
        return runCommentProcessors(expressionContext, c.asPlaceholder()) ? Optional.of(c) : Optional.empty();
147
    }
148
149
    /**
150
     * Finds all processor expressions within the specified paragraph and tries
151
     * to evaluate it against all registered {@link CommentProcessor}s.
152
     *
153
     * @param context   the context root object against which evaluation is done
154
     * @param paragraph the paragraph to process.
155
     * @param <T>       type of the context root object
156
     */
157
    private <T> void runProcessorsOnInlineContent(T context, Paragraph paragraph) {
158
        var processorContexts = findProcessors(paragraph.asString()).stream()
159
                                                                    .map(paragraph::processorContext)
160
                                                                    .toList();
161
        for (var processorContext : processorContexts) {
162 1 1. runProcessorsOnInlineContent : removed call to pro/verron/officestamper/core/CommentProcessors::setContext → KILLED
            commentProcessors.setContext(processorContext);
163
            var placeholder = processorContext.placeholder();
164
            try {
165 1 1. runProcessorsOnInlineContent : removed call to pro/verron/officestamper/core/ExpressionResolver::setContext → KILLED
                expressionResolver.setContext(context);
166
                expressionResolver.resolve(placeholder);
167 1 1. runProcessorsOnInlineContent : removed call to pro/verron/officestamper/api/Paragraph::replace → KILLED
                paragraph.replace(placeholder, WmlFactory.newRun(""));
168
                logger.debug("Placeholder '{}' successfully processed by a comment processor.", placeholder);
169
            } catch (SpelEvaluationException | SpelParseException e) {
170
                var message = "Placeholder '%s' failed to process.".formatted(placeholder);
171
                exceptionResolver.resolve(placeholder, message, e);
172
            }
173 1 1. runProcessorsOnInlineContent : removed call to pro/verron/officestamper/core/CommentProcessors::commitChanges → KILLED
            commentProcessors.commitChanges(source);
174
        }
175
    }
176
177
    private WordprocessingMLPackage document() {
178 1 1. document : replaced return value with null for pro/verron/officestamper/core/CommentProcessorRegistry::document → KILLED
        return source.document();
179
    }
180
181
    private void onRangeStart(
182
            CommentRangeStart crs,
183
            HashMap<BigInteger, Comment> allComments,
184
            Queue<Comment> stack,
185
            HashMap<BigInteger, Comment> rootComments
186
    ) {
187
        Comment comment = allComments.get(crs.getId());
188 1 1. onRangeStart : negated conditional → KILLED
        if (comment == null) {
189
            comment = new StandardComment(document());
190
            allComments.put(crs.getId(), comment);
191 1 1. onRangeStart : negated conditional → KILLED
            if (stack.isEmpty()) {
192
                rootComments.put(crs.getId(), comment);
193
            }
194
            else {
195
                stack.peek()
196
                     .getChildren()
197
                     .add(comment);
198
            }
199
        }
200 1 1. onRangeStart : removed call to pro/verron/officestamper/api/Comment::setCommentRangeStart → KILLED
        comment.setCommentRangeStart(crs);
201
        stack.add(comment);
202
    }
203
204
    private void onRangeEnd(
205
            CommentRangeEnd cre, HashMap<BigInteger, Comment> allComments, Queue<Comment> stack
206
    ) {
207
        Comment comment = allComments.get(cre.getId());
208 1 1. onRangeEnd : negated conditional → KILLED
        if (comment == null)
209
            throw new OfficeStamperException("Found a comment range end before the comment range start !");
210
211 1 1. onRangeEnd : removed call to pro/verron/officestamper/api/Comment::setCommentRangeEnd → KILLED
        comment.setCommentRangeEnd(cre);
212
213 1 1. onRangeEnd : negated conditional → KILLED
        if (!stack.isEmpty()) {
214
            var peek = stack.peek();
215 1 1. onRangeEnd : negated conditional → KILLED
            if (peek.equals(comment)) stack.remove();
216
            else throw new OfficeStamperException("Cannot figure which comment contains the other !");
217
        }
218
    }
219
220
    private void onReference(R.CommentReference cr, HashMap<BigInteger, Comment> allComments) {
221
        Comment comment = allComments.get(cr.getId());
222 1 1. onReference : negated conditional → KILLED
        if (comment == null) {
223
            comment = new StandardComment(document());
224
            allComments.put(cr.getId(), comment);
225
        }
226 1 1. onReference : removed call to pro/verron/officestamper/api/Comment::setCommentReference → KILLED
        comment.setCommentReference(cr);
227
    }
228
229
    private <T> boolean runCommentProcessors(T context, Placeholder commentPlaceholder) {
230
        try {
231 1 1. runCommentProcessors : removed call to pro/verron/officestamper/core/ExpressionResolver::setContext → KILLED
            expressionResolver.setContext(context);
232
            expressionResolver.resolve(commentPlaceholder);
233
            logger.debug("Comment '{}' successfully processed by a comment processor.", commentPlaceholder);
234 1 1. runCommentProcessors : replaced boolean return with false for pro/verron/officestamper/core/CommentProcessorRegistry::runCommentProcessors → KILLED
            return true;
235
        } catch (SpelEvaluationException | SpelParseException e) {
236
            var message = "Comment '%s' failed to process.".formatted(commentPlaceholder.expression());
237
            exceptionResolver.resolve(commentPlaceholder, message, e);
238 1 1. runCommentProcessors : replaced boolean return with true for pro/verron/officestamper/core/CommentProcessorRegistry::runCommentProcessors → KILLED
            return false;
239
        }
240
    }
241
242
}

Mutations

62

1.1
Location : runProcessors
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
removed call to java/util/stream/Stream::forEach → KILLED

66

1.1
Location : lambda$runProcessors$0
Killed by : none
removed call to pro/verron/officestamper/core/CommentProcessors::commitChanges → SURVIVED
Covering tests

67

1.1
Location : lambda$runProcessors$0
Killed by : none
removed call to java/util/Optional::ifPresent → SURVIVED
Covering tests

72

1.1
Location : runProcessors
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
removed call to java/util/stream/Stream::forEach → KILLED

75

1.1
Location : lambda$runProcessors$2
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
removed call to java/util/Optional::ifPresent → KILLED

77

1.1
Location : lambda$runProcessors$1
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#19]
removed call to pro/verron/officestamper/core/CommentProcessors::commitChanges → KILLED

78

1.1
Location : lambda$runProcessors$1
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#17]
removed call to java/util/Optional::ifPresent → KILLED

83

1.1
Location : runProcessors
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#21]
removed call to java/util/stream/Stream::forEach → KILLED

2.2
Location : lambda$runProcessors$3
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#21]
removed call to pro/verron/officestamper/core/CommentProcessorRegistry::runProcessorsOnInlineContent → KILLED

85

1.1
Location : runProcessors
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
removed call to java/util/ArrayList::forEach → KILLED

95

1.1
Location : collectComments
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:doesNotFail()]
removed call to pro/verron/officestamper/core/CommentProcessorRegistry::onRangeStart → KILLED

2.2
Location : collectComments
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

96

1.1
Location : collectComments
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
removed call to pro/verron/officestamper/core/CommentProcessorRegistry::onRangeEnd → KILLED

2.2
Location : collectComments
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

97

1.1
Location : collectComments
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
removed call to pro/verron/officestamper/core/CommentProcessorRegistry::onReference → KILLED

2.2
Location : collectComments
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
negated conditional → KILLED

104

1.1
Location : lambda$collectComments$4
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#22]
replaced boolean return with true for pro/verron/officestamper/core/CommentProcessorRegistry::lambda$collectComments$4 → KILLED

2.2
Location : lambda$collectComments$4
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
replaced boolean return with false for pro/verron/officestamper/core/CommentProcessorRegistry::lambda$collectComments$4 → KILLED

105

1.1
Location : collectComments
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
removed call to java/util/stream/Stream::forEach → KILLED

106

1.1
Location : lambda$collectComments$5
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
removed call to pro/verron/officestamper/api/Comment::setComment → KILLED

107

1.1
Location : collectComments
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
replaced return value with Collections.emptyMap for pro/verron/officestamper/core/CommentProcessorRegistry::collectComments → KILLED

113

1.1
Location : runProcessorsOnRunComment
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/core/CommentProcessorRegistry::runProcessorsOnRunComment → SURVIVED
Covering tests

114

1.1
Location : lambda$runProcessorsOnRunComment$6
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
replaced return value with Optional.empty for pro/verron/officestamper/core/CommentProcessorRegistry::lambda$runProcessorsOnRunComment$6 → KILLED

119

1.1
Location : lambda$runProcessorsOnRunComment$7
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#22]
removed call to pro/verron/officestamper/core/CommentProcessors::setContext → KILLED

120

1.1
Location : lambda$runProcessorsOnRunComment$7
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#30]
negated conditional → KILLED

139

1.1
Location : runProcessorsOnParagraphComment
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

145

1.1
Location : runProcessorsOnParagraphComment
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#19]
removed call to pro/verron/officestamper/core/CommentProcessors::setContext → KILLED

146

1.1
Location : runProcessorsOnParagraphComment
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#30]
negated conditional → KILLED

162

1.1
Location : runProcessorsOnInlineContent
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#20]
removed call to pro/verron/officestamper/core/CommentProcessors::setContext → KILLED

165

1.1
Location : runProcessorsOnInlineContent
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#21]
removed call to pro/verron/officestamper/core/ExpressionResolver::setContext → KILLED

167

1.1
Location : runProcessorsOnInlineContent
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#21]
removed call to pro/verron/officestamper/api/Paragraph::replace → KILLED

173

1.1
Location : runProcessorsOnInlineContent
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#20]
removed call to pro/verron/officestamper/core/CommentProcessors::commitChanges → KILLED

178

1.1
Location : document
Killed by : pro.verron.officestamper.test.ResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ResolutionTest]/[test-template:testCustomResolution(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String, boolean, java.lang.String)]/[test-template-invocation:#30]
replaced return value with null for pro/verron/officestamper/core/CommentProcessorRegistry::document → KILLED

188

1.1
Location : onRangeStart
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

191

1.1
Location : onRangeStart
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

200

1.1
Location : onRangeStart
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
removed call to pro/verron/officestamper/api/Comment::setCommentRangeStart → KILLED

208

1.1
Location : onRangeEnd
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:doesNotFail()]
negated conditional → KILLED

211

1.1
Location : onRangeEnd
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
removed call to pro/verron/officestamper/api/Comment::setCommentRangeEnd → KILLED

213

1.1
Location : onRangeEnd
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
negated conditional → KILLED

215

1.1
Location : onRangeEnd
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:doesNotFail()]
negated conditional → KILLED

222

1.1
Location : onReference
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

226

1.1
Location : onReference
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
removed call to pro/verron/officestamper/api/Comment::setCommentReference → KILLED

231

1.1
Location : runCommentProcessors
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#22]
removed call to pro/verron/officestamper/core/ExpressionResolver::setContext → KILLED

234

1.1
Location : runCommentProcessors
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
replaced boolean return with false for pro/verron/officestamper/core/CommentProcessorRegistry::runCommentProcessors → KILLED

238

1.1
Location : runCommentProcessors
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#30]
replaced boolean return with true for pro/verron/officestamper/core/CommentProcessorRegistry::runCommentProcessors → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.1