1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.xml.mapper; |
17 |
|
|
18 |
|
import java.util.ArrayList; |
19 |
|
import java.util.HashMap; |
20 |
|
import java.util.List; |
21 |
|
import java.util.Map; |
22 |
|
|
23 |
|
import org.qedeq.base.trace.Trace; |
24 |
|
import org.qedeq.base.utility.Enumerator; |
25 |
|
import org.qedeq.kernel.se.base.list.ElementList; |
26 |
|
import org.qedeq.kernel.se.base.module.Add; |
27 |
|
import org.qedeq.kernel.se.base.module.Author; |
28 |
|
import org.qedeq.kernel.se.base.module.AuthorList; |
29 |
|
import org.qedeq.kernel.se.base.module.Axiom; |
30 |
|
import org.qedeq.kernel.se.base.module.ChangedRule; |
31 |
|
import org.qedeq.kernel.se.base.module.ChangedRuleList; |
32 |
|
import org.qedeq.kernel.se.base.module.Chapter; |
33 |
|
import org.qedeq.kernel.se.base.module.ChapterList; |
34 |
|
import org.qedeq.kernel.se.base.module.Conclusion; |
35 |
|
import org.qedeq.kernel.se.base.module.ConditionalProof; |
36 |
|
import org.qedeq.kernel.se.base.module.Existential; |
37 |
|
import org.qedeq.kernel.se.base.module.FormalProof; |
38 |
|
import org.qedeq.kernel.se.base.module.FormalProofLine; |
39 |
|
import org.qedeq.kernel.se.base.module.FormalProofLineList; |
40 |
|
import org.qedeq.kernel.se.base.module.FormalProofList; |
41 |
|
import org.qedeq.kernel.se.base.module.Formula; |
42 |
|
import org.qedeq.kernel.se.base.module.FunctionDefinition; |
43 |
|
import org.qedeq.kernel.se.base.module.Header; |
44 |
|
import org.qedeq.kernel.se.base.module.Hypothesis; |
45 |
|
import org.qedeq.kernel.se.base.module.Import; |
46 |
|
import org.qedeq.kernel.se.base.module.ImportList; |
47 |
|
import org.qedeq.kernel.se.base.module.InitialFunctionDefinition; |
48 |
|
import org.qedeq.kernel.se.base.module.InitialPredicateDefinition; |
49 |
|
import org.qedeq.kernel.se.base.module.Latex; |
50 |
|
import org.qedeq.kernel.se.base.module.LatexList; |
51 |
|
import org.qedeq.kernel.se.base.module.LinkList; |
52 |
|
import org.qedeq.kernel.se.base.module.LiteratureItem; |
53 |
|
import org.qedeq.kernel.se.base.module.LiteratureItemList; |
54 |
|
import org.qedeq.kernel.se.base.module.Location; |
55 |
|
import org.qedeq.kernel.se.base.module.LocationList; |
56 |
|
import org.qedeq.kernel.se.base.module.ModusPonens; |
57 |
|
import org.qedeq.kernel.se.base.module.Node; |
58 |
|
import org.qedeq.kernel.se.base.module.PredicateDefinition; |
59 |
|
import org.qedeq.kernel.se.base.module.Proof; |
60 |
|
import org.qedeq.kernel.se.base.module.ProofList; |
61 |
|
import org.qedeq.kernel.se.base.module.Proposition; |
62 |
|
import org.qedeq.kernel.se.base.module.Qedeq; |
63 |
|
import org.qedeq.kernel.se.base.module.Reason; |
64 |
|
import org.qedeq.kernel.se.base.module.Rename; |
65 |
|
import org.qedeq.kernel.se.base.module.Rule; |
66 |
|
import org.qedeq.kernel.se.base.module.Section; |
67 |
|
import org.qedeq.kernel.se.base.module.SectionList; |
68 |
|
import org.qedeq.kernel.se.base.module.Specification; |
69 |
|
import org.qedeq.kernel.se.base.module.Subsection; |
70 |
|
import org.qedeq.kernel.se.base.module.SubsectionList; |
71 |
|
import org.qedeq.kernel.se.base.module.SubstFree; |
72 |
|
import org.qedeq.kernel.se.base.module.SubstFunc; |
73 |
|
import org.qedeq.kernel.se.base.module.SubstPred; |
74 |
|
import org.qedeq.kernel.se.base.module.Term; |
75 |
|
import org.qedeq.kernel.se.base.module.Universal; |
76 |
|
import org.qedeq.kernel.se.base.module.UsedByList; |
77 |
|
import org.qedeq.kernel.se.common.ModuleContext; |
78 |
|
import org.qedeq.kernel.se.common.ModuleDataException; |
79 |
|
import org.qedeq.kernel.se.visitor.AbstractModuleVisitor; |
80 |
|
import org.qedeq.kernel.se.visitor.QedeqNotNullTraverser; |
81 |
|
import org.qedeq.kernel.xml.tracker.SimpleXPath; |
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
@link |
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
@link |
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
@author |
102 |
|
|
|
|
| 35.2% |
Uncovered Elements: 486 (750) |
Complexity: 156 |
Complexity Density: 0.28 |
|
103 |
|
public final class Context2SimpleXPath extends AbstractModuleVisitor { |
104 |
|
|
105 |
|
|
106 |
|
private static final Class CLASS = Context2SimpleXPath.class; |
107 |
|
|
108 |
|
|
109 |
|
private QedeqNotNullTraverser traverser; |
110 |
|
|
111 |
|
|
112 |
|
private Qedeq qedeq; |
113 |
|
|
114 |
|
|
115 |
|
private final ModuleContext find; |
116 |
|
|
117 |
|
|
118 |
|
private SimpleXPath current; |
119 |
|
|
120 |
|
|
121 |
|
private final List elements; |
122 |
|
|
123 |
|
|
124 |
|
private int level; |
125 |
|
|
126 |
|
|
127 |
|
private boolean matching; |
128 |
|
|
129 |
|
@link |
130 |
|
private String matchingBegin; |
131 |
|
|
132 |
|
@link |
133 |
|
private SimpleXPath matchingPath; |
134 |
|
|
135 |
|
|
136 |
|
|
137 |
|
|
138 |
|
@param |
139 |
|
@param |
140 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
141 |
15
|
private Context2SimpleXPath(final ModuleContext find, final Qedeq qedeq) {... |
142 |
15
|
this.qedeq = qedeq; |
143 |
15
|
traverser = new QedeqNotNullTraverser(find.getModuleLocation(), this); |
144 |
15
|
this.find = find; |
145 |
15
|
elements = new ArrayList(20); |
146 |
|
} |
147 |
|
|
148 |
|
|
149 |
|
@link |
150 |
|
|
151 |
|
|
152 |
|
|
153 |
|
@link |
154 |
|
|
155 |
|
|
156 |
|
|
157 |
|
|
158 |
|
|
159 |
|
|
160 |
|
|
161 |
|
|
162 |
|
|
163 |
|
|
164 |
|
|
165 |
|
|
166 |
|
|
167 |
|
|
168 |
|
@param |
169 |
|
@param |
170 |
|
@return |
171 |
|
@throws |
172 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
173 |
15
|
public static SimpleXPath getXPath(final ModuleContext find, final Qedeq qedeq)... |
174 |
|
throws ModuleDataException { |
175 |
15
|
final Context2SimpleXPath converter = new Context2SimpleXPath(find, qedeq); |
176 |
15
|
return converter.find(); |
177 |
|
} |
178 |
|
|
|
|
| 87.5% |
Uncovered Elements: 2 (16) |
Complexity: 3 |
Complexity Density: 0.21 |
|
179 |
15
|
private final SimpleXPath find() throws ModuleDataException {... |
180 |
15
|
final String method = "find()"; |
181 |
15
|
Trace.paramInfo(CLASS, this, method, "find", find); |
182 |
15
|
elements.clear(); |
183 |
15
|
level = 0; |
184 |
15
|
current = new SimpleXPath(); |
185 |
15
|
try { |
186 |
15
|
traverser.accept(qedeq); |
187 |
|
} catch (LocationFoundException e) { |
188 |
14
|
Trace.paramInfo(CLASS, this, method, "location found", current); |
189 |
14
|
return current; |
190 |
|
} |
191 |
1
|
Trace.param(CLASS, this, method, "level", level); |
192 |
1
|
Trace.info(CLASS, this, method, "location was not found"); |
193 |
|
|
194 |
1
|
if (Boolean.TRUE.toString().equalsIgnoreCase( |
195 |
|
System.getProperty("qedeq.test.xmlLocationFailures"))) { |
196 |
1
|
throw new LocationNotFoundException(traverser.getCurrentContext(), |
197 |
|
matchingBegin, find.getLocationWithinModule()); |
198 |
|
} |
199 |
0
|
throw new LocationFoundException(new ModuleContext(find.getModuleLocation(), |
200 |
|
matchingBegin)); |
201 |
|
} |
202 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
203 |
15
|
public final void visitEnter(final Qedeq qedeq) throws ModuleDataException {... |
204 |
15
|
enter("QEDEQ"); |
205 |
15
|
final String method = "visitEnter(Qedeq)"; |
206 |
15
|
Trace.param(CLASS, this, method, "current", current); |
207 |
15
|
checkMatching(method); |
208 |
|
} |
209 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
210 |
1
|
public final void visitLeave(final Qedeq qedeq) {... |
211 |
1
|
leave(); |
212 |
|
} |
213 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
214 |
14
|
public final void visitEnter(final Header header) throws ModuleDataException {... |
215 |
14
|
enter("HEADER"); |
216 |
14
|
final String method = "visitEnter(Header)"; |
217 |
14
|
Trace.param(CLASS, this, method, "current", current); |
218 |
14
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
219 |
14
|
checkMatching(method); |
220 |
|
|
221 |
13
|
traverser.setLocationWithinModule(context + ".getEmail()"); |
222 |
13
|
current.setAttribute("email"); |
223 |
13
|
checkIfFound(); |
224 |
|
} |
225 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
226 |
13
|
public final void visitLeave(final Header header) {... |
227 |
13
|
leave(); |
228 |
|
} |
229 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
230 |
0
|
public final void visitEnter(final Specification specification) throws ModuleDataException {... |
231 |
0
|
enter("SPECIFICATION"); |
232 |
0
|
final String method = "visitEnter(Specification)"; |
233 |
0
|
Trace.param(CLASS, this, method, "current", current); |
234 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
235 |
0
|
checkMatching(method); |
236 |
|
|
237 |
0
|
traverser.setLocationWithinModule(context + ".getName()"); |
238 |
0
|
current.setAttribute("name"); |
239 |
0
|
checkIfFound(); |
240 |
|
|
241 |
0
|
traverser.setLocationWithinModule(context + ".getRuleVersion()"); |
242 |
0
|
current.setAttribute("ruleVersion"); |
243 |
0
|
checkIfFound(); |
244 |
|
} |
245 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
246 |
0
|
public final void visitLeave(final Specification specification) {... |
247 |
0
|
leave(); |
248 |
|
} |
249 |
|
|
|
|
| 54.5% |
Uncovered Elements: 25 (55) |
Complexity: 13 |
Complexity Density: 0.42 |
|
250 |
70
|
public final void visitEnter(final LatexList latexList) throws ModuleDataException {... |
251 |
70
|
final String method = "visitEnter(LatexList)"; |
252 |
70
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
253 |
70
|
final String name; |
254 |
70
|
if (context.endsWith(".getTitle()")) { |
255 |
31
|
name = "TITLE"; |
256 |
39
|
} else if (context.endsWith(".getSummary()")) { |
257 |
0
|
name = "ABSTRACT"; |
258 |
39
|
} else if (context.endsWith(".getIntroduction()")) { |
259 |
24
|
name = "INTRODUCTION"; |
260 |
15
|
} else if (context.endsWith(".getName()")) { |
261 |
7
|
name = "NAME"; |
262 |
8
|
} else if (context.endsWith(".getPrecedingText()")) { |
263 |
7
|
name = "PRECEDING"; |
264 |
1
|
} else if (context.endsWith(".getSucceedingText()")) { |
265 |
1
|
name = "SUCCEEDING"; |
266 |
0
|
} else if (context.endsWith(".getLatex()")) { |
267 |
0
|
name = "TEXT"; |
268 |
0
|
} else if (context.endsWith(".getDescription()")) { |
269 |
0
|
if (context.indexOf(".getChangedRuleList().get(") >= 0) { |
270 |
0
|
name = null; |
271 |
|
} else { |
272 |
0
|
name = "DESCRIPTION"; |
273 |
|
} |
274 |
0
|
} else if (context.endsWith(".getNonFormalProof()")) { |
275 |
0
|
name = null; |
276 |
0
|
} else if (context.endsWith(".getItem()")) { |
277 |
0
|
name = null; |
278 |
|
} else { |
279 |
0
|
throw new IllegalArgumentException("unknown LatexList " + context); |
280 |
|
} |
281 |
70
|
Trace.param(CLASS, this, method, "name", name); |
282 |
70
|
if (name != null) { |
283 |
70
|
enter(name); |
284 |
|
} |
285 |
70
|
Trace.param(CLASS, this, method, "current", current); |
286 |
|
|
287 |
70
|
checkMatching(method); |
288 |
|
} |
289 |
|
|
|
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 5 |
Complexity Density: 1.67 |
|
290 |
70
|
public final void visitLeave(final LatexList latexList) {... |
291 |
70
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
292 |
70
|
if (!context.endsWith(".getNonFormalProof()") |
293 |
|
&& !context.endsWith(".getItem()") && !(context.endsWith(".getDescription()") |
294 |
|
&& context.indexOf(".getChangedRuleList().get(") >= 0)) { |
295 |
70
|
leave(); |
296 |
|
} |
297 |
|
} |
298 |
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 2 |
Complexity Density: 0.15 |
|
299 |
0
|
public final void visitEnter(final Latex latex) throws ModuleDataException {... |
300 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
301 |
0
|
if (context.indexOf(".getAuthorList().get(") >= 0) { |
302 |
0
|
enter("NAME"); |
303 |
|
} |
304 |
0
|
enter("LATEX"); |
305 |
0
|
final String method = "visitEnter(Latex)"; |
306 |
0
|
Trace.param(CLASS, this, method, "current", current); |
307 |
0
|
checkMatching(method); |
308 |
|
|
309 |
0
|
traverser.setLocationWithinModule(context + ".getLanguage()"); |
310 |
0
|
current.setAttribute("language"); |
311 |
0
|
checkIfFound(); |
312 |
|
|
313 |
0
|
traverser.setLocationWithinModule(context + ".getLatex()"); |
314 |
0
|
current.setAttribute(null); |
315 |
0
|
checkIfFound(); |
316 |
|
} |
317 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
318 |
0
|
public final void visitLeave(final Latex latex) {... |
319 |
|
|
320 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
321 |
0
|
if (context.indexOf(".getAuthorList().get(") >= 0) { |
322 |
0
|
leave(); |
323 |
|
} |
324 |
0
|
leave(); |
325 |
|
} |
326 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
327 |
0
|
public final void visitEnter(final LocationList locationList) throws ModuleDataException {... |
328 |
0
|
enter("LOCATIONS"); |
329 |
0
|
final String method = "visitEnter(LocationList)"; |
330 |
0
|
Trace.param(CLASS, this, method, "current", current); |
331 |
0
|
checkMatching(method); |
332 |
|
|
333 |
|
} |
334 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
335 |
0
|
public final void visitLeave(final LocationList locationList) {... |
336 |
0
|
leave(); |
337 |
|
} |
338 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
339 |
0
|
public final void visitEnter(final Location location) throws ModuleDataException {... |
340 |
0
|
enter("LOCATION"); |
341 |
0
|
final String method = "visitEnter(Location)"; |
342 |
0
|
Trace.param(CLASS, this, method, "current", current); |
343 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
344 |
0
|
checkMatching(method); |
345 |
|
|
346 |
0
|
traverser.setLocationWithinModule(context + ".getLocation()"); |
347 |
0
|
current.setAttribute("value"); |
348 |
0
|
checkIfFound(); |
349 |
|
} |
350 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
351 |
0
|
public final void visitLeave(final Location location) {... |
352 |
0
|
leave(); |
353 |
|
} |
354 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
355 |
0
|
public final void visitEnter(final AuthorList authorList) throws ModuleDataException {... |
356 |
0
|
enter("AUTHORS"); |
357 |
0
|
final String method = "visitEnter(AuthorList)"; |
358 |
0
|
Trace.param(CLASS, this, method, "current", current); |
359 |
0
|
checkMatching(method); |
360 |
|
} |
361 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
362 |
0
|
public final void visitLeave(final AuthorList authorList) {... |
363 |
0
|
leave(); |
364 |
|
} |
365 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
366 |
0
|
public final void visitEnter(final Author author) throws ModuleDataException {... |
367 |
0
|
enter("AUTHOR"); |
368 |
0
|
final String method = "visitEnter(Author)"; |
369 |
0
|
Trace.param(CLASS, this, method, "current", current); |
370 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
371 |
0
|
checkMatching(method); |
372 |
|
|
373 |
0
|
traverser.setLocationWithinModule(context + ".getEmail()"); |
374 |
0
|
current.setAttribute("email"); |
375 |
0
|
checkIfFound(); |
376 |
|
} |
377 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
378 |
0
|
public final void visitLeave(final Author author) {... |
379 |
0
|
leave(); |
380 |
|
} |
381 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
382 |
0
|
public final void visitEnter(final ImportList importList) throws ModuleDataException {... |
383 |
0
|
enter("IMPORTS"); |
384 |
0
|
final String method = "visitEnter(ImportList)"; |
385 |
0
|
Trace.param(CLASS, this, method, "current", current); |
386 |
0
|
checkMatching(method); |
387 |
|
} |
388 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
389 |
0
|
public final void visitLeave(final ImportList importList) {... |
390 |
0
|
leave(); |
391 |
|
} |
392 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
393 |
0
|
public final void visitEnter(final Import imp) throws ModuleDataException {... |
394 |
0
|
enter("IMPORT"); |
395 |
0
|
final String method = "visitEnter(Import)"; |
396 |
0
|
Trace.param(CLASS, this, method, "current", current); |
397 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
398 |
0
|
checkMatching(method); |
399 |
|
|
400 |
0
|
traverser.setLocationWithinModule(context + ".getLabel()"); |
401 |
0
|
current.setAttribute("label"); |
402 |
0
|
checkIfFound(); |
403 |
|
} |
404 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
405 |
0
|
public final void visitLeave(final Import imp) {... |
406 |
0
|
leave(); |
407 |
|
} |
408 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
409 |
0
|
public final void visitEnter(final UsedByList usedByList) throws ModuleDataException {... |
410 |
0
|
enter("USEDBY"); |
411 |
0
|
final String method = "visitEnter(UsedByList)"; |
412 |
0
|
Trace.param(CLASS, this, method, "current", current); |
413 |
0
|
checkMatching(method); |
414 |
|
} |
415 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
416 |
0
|
public final void visitLeave(final UsedByList usedByList) {... |
417 |
0
|
leave(); |
418 |
|
} |
419 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
420 |
13
|
public final void visitEnter(final ChapterList chapterList) throws ModuleDataException {... |
421 |
13
|
final String method = "visitEnter(ChapterList)"; |
422 |
|
|
423 |
|
|
424 |
13
|
checkMatching(method); |
425 |
|
} |
426 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
427 |
1
|
public final void visitLeave(final ChapterList chapterList) {... |
428 |
1
|
traverser.setBlocked(false); |
429 |
|
} |
430 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
431 |
13
|
public final void visitEnter(final Chapter chapter) throws ModuleDataException {... |
432 |
13
|
enter("CHAPTER"); |
433 |
13
|
final String method = "visitEnter(Chapter)"; |
434 |
13
|
Trace.param(CLASS, this, method, "current", current); |
435 |
13
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
436 |
13
|
checkMatching(method); |
437 |
|
|
438 |
12
|
traverser.setLocationWithinModule(context + ".getNoNumber()"); |
439 |
12
|
current.setAttribute("noNumber"); |
440 |
12
|
checkIfFound(); |
441 |
|
} |
442 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
443 |
1
|
public final void visitLeave(final Chapter chapter) {... |
444 |
1
|
leave(); |
445 |
|
} |
446 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
447 |
12
|
public final void visitEnter(final SectionList sectionList) throws ModuleDataException {... |
448 |
12
|
final String method = "visitEnter(SectionList)"; |
449 |
|
|
450 |
|
|
451 |
12
|
checkMatching(method); |
452 |
|
} |
453 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
454 |
1
|
public final void visitLeave(final SectionList sectionList) {... |
455 |
1
|
traverser.setBlocked(false); |
456 |
|
} |
457 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
458 |
12
|
public final void visitEnter(final Section section) throws ModuleDataException {... |
459 |
12
|
enter("SECTION"); |
460 |
12
|
final String method = "visitEnter(Section)"; |
461 |
12
|
Trace.param(CLASS, this, method, "current", current); |
462 |
12
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
463 |
12
|
checkMatching(method); |
464 |
|
|
465 |
12
|
traverser.setLocationWithinModule(context + ".getNoNumber()"); |
466 |
12
|
current.setAttribute("noNumber"); |
467 |
12
|
checkIfFound(); |
468 |
|
} |
469 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
470 |
1
|
public final void visitLeave(final Section section) {... |
471 |
1
|
leave(); |
472 |
|
} |
473 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
474 |
12
|
public final void visitEnter(final SubsectionList subsectionList) throws ModuleDataException {... |
475 |
12
|
enter("SUBSECTIONS"); |
476 |
12
|
final String method = "visitEnter(SubsectionList)"; |
477 |
12
|
Trace.param(CLASS, this, method, "current", current); |
478 |
12
|
checkMatching(method); |
479 |
|
} |
480 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
481 |
1
|
public final void visitLeave(final SubsectionList subsectionList) {... |
482 |
1
|
leave(); |
483 |
|
} |
484 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
485 |
0
|
public final void visitEnter(final Subsection subsection) throws ModuleDataException {... |
486 |
0
|
enter("SUBSECTION"); |
487 |
0
|
final String method = "visitEnter(Subsection)"; |
488 |
0
|
Trace.param(CLASS, this, method, "current", current); |
489 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
490 |
0
|
checkMatching(method); |
491 |
|
|
492 |
0
|
traverser.setLocationWithinModule(context + ".getId()"); |
493 |
0
|
current.setAttribute("id"); |
494 |
0
|
checkIfFound(); |
495 |
|
|
496 |
0
|
traverser.setLocationWithinModule(context + ".getLevel()"); |
497 |
0
|
current.setAttribute("level"); |
498 |
0
|
checkIfFound(); |
499 |
|
} |
500 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
501 |
0
|
public final void visitLeave(final Subsection subsection) {... |
502 |
0
|
leave(); |
503 |
|
} |
504 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 1 |
Complexity Density: 0.07 |
|
505 |
28
|
public final void visitEnter(final Node node) throws ModuleDataException {... |
506 |
28
|
enter("NODE"); |
507 |
28
|
final String method = "visitEnter(Node)"; |
508 |
28
|
Trace.param(CLASS, this, method, "current", current); |
509 |
28
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
510 |
28
|
checkMatching(method); |
511 |
|
|
512 |
23
|
traverser.setLocationWithinModule(context + ".getId()"); |
513 |
23
|
current.setAttribute("id"); |
514 |
23
|
checkIfFound(); |
515 |
|
|
516 |
23
|
traverser.setLocationWithinModule(context + ".getLevel()"); |
517 |
23
|
current.setAttribute("level"); |
518 |
23
|
checkIfFound(); |
519 |
|
|
520 |
|
|
521 |
23
|
traverser.setLocationWithinModule(context + ".getNodeType()"); |
522 |
23
|
current.setAttribute(null); |
523 |
23
|
checkIfFound(); |
524 |
|
|
525 |
|
} |
526 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
527 |
17
|
public final void visitLeave(final Node node) {... |
528 |
17
|
leave(); |
529 |
|
} |
530 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
531 |
4
|
public final void visitEnter(final Axiom axiom) throws ModuleDataException {... |
532 |
4
|
enter("AXIOM"); |
533 |
4
|
final String method = "visitEnter(Axiom)"; |
534 |
4
|
Trace.param(CLASS, this, method, "current", current); |
535 |
4
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
536 |
4
|
checkMatching(method); |
537 |
|
|
538 |
4
|
traverser.setLocationWithinModule(context + ".getDefinedOperator()"); |
539 |
4
|
current.setAttribute("definedOperator"); |
540 |
4
|
checkIfFound(); |
541 |
|
} |
542 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
543 |
0
|
public final void visitLeave(final Axiom axiom) {... |
544 |
0
|
leave(); |
545 |
|
} |
546 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
547 |
0
|
public final void visitEnter(final Proposition proposition) throws ModuleDataException {... |
548 |
0
|
enter("THEOREM"); |
549 |
0
|
final String method = "visitEnter(Proposition)"; |
550 |
0
|
Trace.param(CLASS, this, method, "current", current); |
551 |
0
|
checkMatching(method); |
552 |
|
} |
553 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
554 |
0
|
public final void visitLeave(final Proposition proposition) {... |
555 |
0
|
leave(); |
556 |
|
} |
557 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
558 |
0
|
public final void visitEnter(final ProofList proofList) throws ModuleDataException {... |
559 |
0
|
final String method = "visitEnter(ProofList)"; |
560 |
|
|
561 |
|
|
562 |
0
|
checkMatching(method); |
563 |
|
} |
564 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
565 |
0
|
public final void visitEnter(final Proof proof) throws ModuleDataException {... |
566 |
0
|
enter("PROOF"); |
567 |
0
|
final String method = "visitEnter(Proof)"; |
568 |
0
|
Trace.param(CLASS, this, method, "current", current); |
569 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
570 |
0
|
checkMatching(method); |
571 |
|
|
572 |
0
|
traverser.setLocationWithinModule(context + ".getKind()"); |
573 |
0
|
current.setAttribute("kind"); |
574 |
0
|
checkIfFound(); |
575 |
|
|
576 |
0
|
traverser.setLocationWithinModule(context + ".getLevel()"); |
577 |
0
|
current.setAttribute("level"); |
578 |
0
|
checkIfFound(); |
579 |
|
} |
580 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
581 |
0
|
public final void visitLeave(final Proof proof) {... |
582 |
0
|
leave(); |
583 |
|
} |
584 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
585 |
0
|
public final void visitEnter(final FormalProofList proofList) throws ModuleDataException {... |
586 |
0
|
final String method = "visitEnter(FormalProofList)"; |
587 |
|
|
588 |
|
|
589 |
0
|
checkMatching(method); |
590 |
|
} |
591 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
592 |
0
|
public final void visitEnter(final FormalProof proof) throws ModuleDataException {... |
593 |
0
|
enter("FORMAL_PROOF"); |
594 |
0
|
final String method = "visitEnter(FormalProof)"; |
595 |
0
|
Trace.param(CLASS, this, method, "current", current); |
596 |
0
|
checkMatching(method); |
597 |
|
} |
598 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
599 |
0
|
public final void visitLeave(final FormalProof proof) {... |
600 |
0
|
leave(); |
601 |
|
} |
602 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
603 |
0
|
public final void visitEnter(final FormalProofLineList list) throws ModuleDataException {... |
604 |
0
|
enter("LINES"); |
605 |
0
|
final String method = "visitEnter(FormalProofLineList)"; |
606 |
0
|
Trace.param(CLASS, this, method, "current", current); |
607 |
0
|
checkMatching(method); |
608 |
|
} |
609 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
610 |
0
|
public final void visitLeave(final FormalProofLineList list) {... |
611 |
0
|
leave(); |
612 |
|
} |
613 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
614 |
0
|
public final void visitEnter(final FormalProofLine line) throws ModuleDataException {... |
615 |
0
|
enter("L"); |
616 |
0
|
final String method = "visitEnter(FormalProofLine)"; |
617 |
0
|
Trace.param(CLASS, this, method, "current", current); |
618 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
619 |
0
|
checkMatching(method); |
620 |
|
|
621 |
0
|
traverser.setLocationWithinModule(context + ".getLabel()"); |
622 |
0
|
current.setAttribute("label"); |
623 |
0
|
checkIfFound(); |
624 |
|
} |
625 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
626 |
0
|
public final void visitLeave(final FormalProofLine line) {... |
627 |
0
|
leave(); |
628 |
|
} |
629 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
630 |
0
|
public final void visitEnter(final ConditionalProof reason) throws ModuleDataException {... |
631 |
0
|
enter("CP"); |
632 |
0
|
final String method = "visitEnter(ConditionalProof)"; |
633 |
0
|
Trace.param(CLASS, this, method, "current", current); |
634 |
0
|
checkMatching(method); |
635 |
|
} |
636 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
637 |
0
|
public final void visitLeave(final ConditionalProof reason) {... |
638 |
0
|
leave(); |
639 |
|
} |
640 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
641 |
0
|
public final void visitEnter(final Reason reason) throws ModuleDataException {... |
642 |
|
|
643 |
0
|
final String method = "visitEnter(Reason)"; |
644 |
0
|
Trace.param(CLASS, this, method, "current", current); |
645 |
0
|
checkMatching(method); |
646 |
|
|
647 |
|
} |
648 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
649 |
0
|
public final void visitLeave(final Reason reason) {... |
650 |
|
|
651 |
|
} |
652 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
653 |
0
|
public final void visitEnter(final Add reason) throws ModuleDataException {... |
654 |
0
|
enter("ADD"); |
655 |
0
|
final String method = "visitEnter(Add)"; |
656 |
0
|
Trace.param(CLASS, this, method, "current", current); |
657 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
658 |
0
|
checkMatching(method); |
659 |
|
|
660 |
0
|
traverser.setLocationWithinModule(context + ".getReference()"); |
661 |
0
|
current.setAttribute("ref"); |
662 |
0
|
checkIfFound(); |
663 |
|
} |
664 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
665 |
0
|
public final void visitLeave(final Add reason) {... |
666 |
0
|
leave(); |
667 |
|
} |
668 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
669 |
0
|
public final void visitEnter(final ModusPonens reason) throws ModuleDataException {... |
670 |
0
|
enter("MP"); |
671 |
0
|
final String method = "visitEnter(ModusPonens)"; |
672 |
0
|
Trace.param(CLASS, this, method, "current", current); |
673 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
674 |
0
|
checkMatching(method); |
675 |
|
|
676 |
0
|
traverser.setLocationWithinModule(context + ".getReference1()"); |
677 |
0
|
current.setAttribute("ref1"); |
678 |
0
|
checkIfFound(); |
679 |
|
|
680 |
0
|
traverser.setLocationWithinModule(context + ".getReference2()"); |
681 |
0
|
current.setAttribute("ref2"); |
682 |
0
|
checkIfFound(); |
683 |
|
} |
684 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
685 |
0
|
public final void visitLeave(final ModusPonens reason) {... |
686 |
0
|
leave(); |
687 |
|
} |
688 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
689 |
0
|
public final void visitEnter(final Rename reason) throws ModuleDataException {... |
690 |
0
|
enter("RENAME"); |
691 |
0
|
final String method = "visitEnter(Add)"; |
692 |
0
|
Trace.param(CLASS, this, method, "current", current); |
693 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
694 |
0
|
checkMatching(method); |
695 |
|
|
696 |
0
|
traverser.setLocationWithinModule(context + ".getReference()"); |
697 |
0
|
current.setAttribute("ref"); |
698 |
0
|
checkIfFound(); |
699 |
|
|
700 |
0
|
traverser.setLocationWithinModule(context + ".getOccurrence()"); |
701 |
0
|
current.setAttribute("occurrence"); |
702 |
0
|
checkIfFound(); |
703 |
|
} |
704 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
705 |
0
|
public final void visitLeave(final Rename reason) {... |
706 |
0
|
leave(); |
707 |
|
} |
708 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
709 |
0
|
public final void visitEnter(final SubstFree reason) throws ModuleDataException {... |
710 |
0
|
enter("SUBST_FREE"); |
711 |
0
|
final String method = "visitEnter(SubstFree)"; |
712 |
0
|
Trace.param(CLASS, this, method, "current", current); |
713 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
714 |
0
|
checkMatching(method); |
715 |
|
|
716 |
0
|
traverser.setLocationWithinModule(context + ".getReference()"); |
717 |
0
|
current.setAttribute("ref"); |
718 |
0
|
checkIfFound(); |
719 |
|
} |
720 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
721 |
0
|
public final void visitLeave(final SubstFree reason) {... |
722 |
0
|
leave(); |
723 |
|
} |
724 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
725 |
0
|
public final void visitEnter(final SubstFunc reason) throws ModuleDataException {... |
726 |
0
|
enter("SUBST_FUNVAR"); |
727 |
0
|
final String method = "visitEnter(SubstFunc)"; |
728 |
0
|
Trace.param(CLASS, this, method, "current", current); |
729 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
730 |
0
|
checkMatching(method); |
731 |
|
|
732 |
0
|
traverser.setLocationWithinModule(context + ".getReference()"); |
733 |
0
|
current.setAttribute("ref"); |
734 |
0
|
checkIfFound(); |
735 |
|
} |
736 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
737 |
0
|
public final void visitLeave(final SubstFunc reason) {... |
738 |
0
|
leave(); |
739 |
|
} |
740 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
741 |
0
|
public final void visitEnter(final SubstPred reason) throws ModuleDataException {... |
742 |
0
|
enter("SUBST_PREDVAR"); |
743 |
0
|
final String method = "visitEnter(SubstPred)"; |
744 |
0
|
Trace.param(CLASS, this, method, "current", current); |
745 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
746 |
0
|
checkMatching(method); |
747 |
|
|
748 |
0
|
traverser.setLocationWithinModule(context + ".getReference()"); |
749 |
0
|
current.setAttribute("ref"); |
750 |
0
|
checkIfFound(); |
751 |
|
} |
752 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
753 |
0
|
public final void visitLeave(final SubstPred reason) {... |
754 |
0
|
leave(); |
755 |
|
} |
756 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
757 |
0
|
public final void visitEnter(final Existential reason) throws ModuleDataException {... |
758 |
0
|
enter("EXISTENTIAL"); |
759 |
0
|
final String method = "visitEnter(Existential)"; |
760 |
0
|
Trace.param(CLASS, this, method, "current", current); |
761 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
762 |
0
|
checkMatching(method); |
763 |
|
|
764 |
0
|
traverser.setLocationWithinModule(context + ".getReference()"); |
765 |
0
|
current.setAttribute("ref"); |
766 |
0
|
checkIfFound(); |
767 |
|
} |
768 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
769 |
0
|
public final void visitLeave(final Existential reason) {... |
770 |
0
|
leave(); |
771 |
|
} |
772 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
773 |
0
|
public final void visitEnter(final Universal reason) throws ModuleDataException {... |
774 |
0
|
enter("UNIVERSAL"); |
775 |
0
|
final String method = "visitEnter(Universal)"; |
776 |
0
|
Trace.param(CLASS, this, method, "current", current); |
777 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
778 |
0
|
checkMatching(method); |
779 |
|
|
780 |
0
|
traverser.setLocationWithinModule(context + ".getReference()"); |
781 |
0
|
current.setAttribute("ref"); |
782 |
0
|
checkIfFound(); |
783 |
|
} |
784 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
785 |
0
|
public final void visitLeave(final Universal reason) {... |
786 |
0
|
leave(); |
787 |
|
} |
788 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
789 |
0
|
public final void visitEnter(final Hypothesis hypothesis) throws ModuleDataException {... |
790 |
0
|
enter("HYPOTHESIS"); |
791 |
0
|
final String method = "visitEnter(Hypothesis)"; |
792 |
0
|
Trace.param(CLASS, this, method, "current", current); |
793 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
794 |
0
|
checkMatching(method); |
795 |
|
|
796 |
0
|
traverser.setLocationWithinModule(context + ".getLabel()"); |
797 |
0
|
current.setAttribute("label"); |
798 |
0
|
checkIfFound(); |
799 |
|
} |
800 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
801 |
0
|
public final void visitLeave(final Hypothesis hypothesis) {... |
802 |
0
|
leave(); |
803 |
|
} |
804 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
805 |
0
|
public final void visitEnter(final Conclusion conclusion) throws ModuleDataException {... |
806 |
0
|
enter("CONCLUSION"); |
807 |
0
|
final String method = "visitEnter(Conclusion)"; |
808 |
0
|
Trace.param(CLASS, this, method, "current", current); |
809 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
810 |
0
|
checkMatching(method); |
811 |
|
|
812 |
0
|
traverser.setLocationWithinModule(context + ".getLabel()"); |
813 |
0
|
current.setAttribute("label"); |
814 |
0
|
checkIfFound(); |
815 |
|
} |
816 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
817 |
0
|
public final void visitLeave(final Conclusion conclusion) {... |
818 |
0
|
leave(); |
819 |
|
} |
820 |
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 3 |
Complexity Density: 0.17 |
|
821 |
0
|
public final void visitEnter(final InitialPredicateDefinition definition) throws ModuleDataException {... |
822 |
0
|
enter("DEFINITION_PREDICATE_INITIAL"); |
823 |
0
|
final String method = "visitEnter(InitialPredicateDefinition)"; |
824 |
0
|
Trace.param(CLASS, this, method, "current", current); |
825 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
826 |
0
|
checkMatching(method); |
827 |
|
|
828 |
0
|
traverser.setLocationWithinModule(context + ".getArgumentNumber()"); |
829 |
0
|
current.setAttribute("arguments"); |
830 |
0
|
checkIfFound(); |
831 |
|
|
832 |
0
|
traverser.setLocationWithinModule(context + ".getName()"); |
833 |
0
|
current.setAttribute("name"); |
834 |
0
|
checkIfFound(); |
835 |
|
|
836 |
0
|
traverser.setLocationWithinModule(context + ".getLatexPattern()"); |
837 |
0
|
enter("LATEXPATTERN"); |
838 |
0
|
if (find.getLocationWithinModule().equals(traverser.getCurrentContext() |
839 |
|
.getLocationWithinModule())) { |
840 |
0
|
if (definition.getLatexPattern() == null) { |
841 |
0
|
leave(); |
842 |
|
} |
843 |
0
|
throw new LocationFoundException(traverser.getCurrentContext()); |
844 |
|
} |
845 |
0
|
leave(); |
846 |
|
} |
847 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
848 |
0
|
public final void visitLeave(final InitialPredicateDefinition definition) {... |
849 |
0
|
leave(); |
850 |
|
} |
851 |
|
|
|
|
| 72.7% |
Uncovered Elements: 6 (22) |
Complexity: 3 |
Complexity Density: 0.17 |
|
852 |
3
|
public final void visitEnter(final PredicateDefinition definition) throws ModuleDataException {... |
853 |
3
|
enter("DEFINITION_PREDICATE"); |
854 |
3
|
final String method = "visitEnter(PredicateDefinition)"; |
855 |
3
|
Trace.param(CLASS, this, method, "current", current); |
856 |
3
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
857 |
3
|
checkMatching(method); |
858 |
|
|
859 |
3
|
traverser.setLocationWithinModule(context + ".getArgumentNumber()"); |
860 |
3
|
current.setAttribute("arguments"); |
861 |
3
|
checkIfFound(); |
862 |
|
|
863 |
3
|
traverser.setLocationWithinModule(context + ".getName()"); |
864 |
3
|
current.setAttribute("name"); |
865 |
3
|
checkIfFound(); |
866 |
|
|
867 |
3
|
traverser.setLocationWithinModule(context + ".getLatexPattern()"); |
868 |
3
|
enter("LATEXPATTERN"); |
869 |
3
|
if (find.getLocationWithinModule().equals(traverser.getCurrentContext() |
870 |
|
.getLocationWithinModule())) { |
871 |
0
|
if (definition.getLatexPattern() == null) { |
872 |
0
|
leave(); |
873 |
|
} |
874 |
0
|
throw new LocationFoundException(traverser.getCurrentContext()); |
875 |
|
} |
876 |
3
|
leave(); |
877 |
|
} |
878 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
879 |
1
|
public final void visitLeave(final PredicateDefinition definition) {... |
880 |
1
|
leave(); |
881 |
|
} |
882 |
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 3 |
Complexity Density: 0.17 |
|
883 |
0
|
public final void visitEnter(final InitialFunctionDefinition definition) throws ModuleDataException {... |
884 |
0
|
enter("DEFINITION_FUNCTION_INITIAL"); |
885 |
0
|
final String method = "visitEnter(InitialFunctionDefinition)"; |
886 |
0
|
Trace.param(CLASS, this, method, "current", current); |
887 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
888 |
0
|
checkMatching(method); |
889 |
|
|
890 |
0
|
traverser.setLocationWithinModule(context + ".getArgumentNumber()"); |
891 |
0
|
current.setAttribute("arguments"); |
892 |
0
|
checkIfFound(); |
893 |
|
|
894 |
0
|
traverser.setLocationWithinModule(context + ".getName()"); |
895 |
0
|
current.setAttribute("name"); |
896 |
0
|
checkIfFound(); |
897 |
|
|
898 |
0
|
traverser.setLocationWithinModule(context + ".getLatexPattern()"); |
899 |
0
|
enter("LATEXPATTERN"); |
900 |
0
|
if (find.getLocationWithinModule().equals(traverser.getCurrentContext() |
901 |
|
.getLocationWithinModule())) { |
902 |
0
|
if (definition.getLatexPattern() == null) { |
903 |
0
|
leave(); |
904 |
|
} |
905 |
0
|
throw new LocationFoundException(traverser.getCurrentContext()); |
906 |
|
} |
907 |
0
|
leave(); |
908 |
|
} |
909 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
910 |
0
|
public final void visitLeave(final InitialFunctionDefinition definition) {... |
911 |
0
|
leave(); |
912 |
|
} |
913 |
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 3 |
Complexity Density: 0.17 |
|
914 |
0
|
public final void visitEnter(final FunctionDefinition definition) throws ModuleDataException {... |
915 |
0
|
enter("DEFINITION_FUNCTION"); |
916 |
0
|
final String method = "visitEnter(FunctionDefinition)"; |
917 |
0
|
Trace.param(CLASS, this, method, "current", current); |
918 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
919 |
0
|
checkMatching(method); |
920 |
|
|
921 |
0
|
traverser.setLocationWithinModule(context + ".getArgumentNumber()"); |
922 |
0
|
current.setAttribute("arguments"); |
923 |
0
|
checkIfFound(); |
924 |
|
|
925 |
0
|
traverser.setLocationWithinModule(context + ".getName()"); |
926 |
0
|
current.setAttribute("name"); |
927 |
0
|
checkIfFound(); |
928 |
|
|
929 |
0
|
traverser.setLocationWithinModule(context + ".getLatexPattern()"); |
930 |
0
|
enter("LATEXPATTERN"); |
931 |
0
|
if (find.getLocationWithinModule().equals(traverser.getCurrentContext() |
932 |
|
.getLocationWithinModule())) { |
933 |
0
|
if (definition.getLatexPattern() == null) { |
934 |
0
|
leave(); |
935 |
|
} |
936 |
0
|
throw new LocationFoundException(traverser.getCurrentContext()); |
937 |
|
} |
938 |
0
|
leave(); |
939 |
|
} |
940 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
941 |
0
|
public final void visitLeave(final FunctionDefinition definition) {... |
942 |
0
|
leave(); |
943 |
|
} |
944 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
945 |
0
|
public final void visitEnter(final Rule rule) throws ModuleDataException {... |
946 |
0
|
enter("RULE"); |
947 |
0
|
final String method = "visitEnter(Rule)"; |
948 |
0
|
Trace.param(CLASS, this, method, "current", current); |
949 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
950 |
0
|
checkMatching(method); |
951 |
|
|
952 |
0
|
traverser.setLocationWithinModule(context + ".getName()"); |
953 |
0
|
current.setAttribute("name"); |
954 |
0
|
checkIfFound(); |
955 |
|
|
956 |
0
|
traverser.setLocationWithinModule(context + ".getVersion()"); |
957 |
0
|
current.setAttribute("version"); |
958 |
0
|
checkIfFound(); |
959 |
|
} |
960 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
961 |
0
|
public final void visitLeave(final Rule rule) {... |
962 |
0
|
leave(); |
963 |
|
} |
964 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
965 |
0
|
public final void visitEnter(final ChangedRuleList list) throws ModuleDataException {... |
966 |
0
|
final String method = "visitEnter(ChangedRuleList)"; |
967 |
|
|
968 |
|
|
969 |
0
|
checkMatching(method); |
970 |
|
} |
971 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
972 |
0
|
public final void visitLeave(final ChangedRuleList list) {... |
973 |
0
|
traverser.setBlocked(false); |
974 |
|
} |
975 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
976 |
0
|
public final void visitEnter(final ChangedRule rule) throws ModuleDataException {... |
977 |
0
|
enter("CHANGED_RULE"); |
978 |
0
|
final String method = "visitEnter(ChangedRule)"; |
979 |
0
|
Trace.param(CLASS, this, method, "current", current); |
980 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
981 |
0
|
checkMatching(method); |
982 |
|
|
983 |
0
|
traverser.setLocationWithinModule(context + ".getName()"); |
984 |
0
|
current.setAttribute("name"); |
985 |
0
|
checkIfFound(); |
986 |
|
|
987 |
0
|
traverser.setLocationWithinModule(context + ".getVersion()"); |
988 |
0
|
current.setAttribute("version"); |
989 |
0
|
checkIfFound(); |
990 |
|
} |
991 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
992 |
0
|
public final void visitLeave(final ChangedRule rule) {... |
993 |
0
|
leave(); |
994 |
|
} |
995 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 3 |
Complexity Density: 0.25 |
|
996 |
0
|
public final void visitEnter(final LinkList linkList) throws ModuleDataException {... |
997 |
0
|
final String method = "visitEnter(LinkList)"; |
998 |
0
|
Trace.param(CLASS, this, method, "current", current); |
999 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
1000 |
0
|
checkMatching(method); |
1001 |
|
|
1002 |
0
|
for (int i = 0; i < linkList.size(); i++) { |
1003 |
0
|
enter("LINK"); |
1004 |
0
|
if (linkList.get(i) != null) { |
1005 |
0
|
traverser.setLocationWithinModule(context + ".get(" + i + ")"); |
1006 |
0
|
current.setAttribute("id"); |
1007 |
0
|
checkIfFound(); |
1008 |
|
} |
1009 |
0
|
leave(); |
1010 |
0
|
}; |
1011 |
|
} |
1012 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1013 |
0
|
public final void visitLeave(final LinkList linkList) {... |
1014 |
|
|
1015 |
|
} |
1016 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
1017 |
7
|
public final void visitEnter(final Formula formula) throws ModuleDataException {... |
1018 |
7
|
enter("FORMULA"); |
1019 |
7
|
final String method = "visitEnter(Formula)"; |
1020 |
7
|
Trace.param(CLASS, this, method, "current", current); |
1021 |
7
|
checkMatching(method); |
1022 |
|
} |
1023 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1024 |
1
|
public final void visitLeave(final Formula formula) {... |
1025 |
1
|
leave(); |
1026 |
|
} |
1027 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
1028 |
0
|
public final void visitEnter(final Term term) throws ModuleDataException {... |
1029 |
0
|
enter("TERM"); |
1030 |
0
|
final String method = "visitEnter(Term)"; |
1031 |
0
|
Trace.param(CLASS, this, method, "current", current); |
1032 |
0
|
checkMatching(method); |
1033 |
|
} |
1034 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1035 |
0
|
public final void visitLeave(final Term term) {... |
1036 |
0
|
leave(); |
1037 |
|
} |
1038 |
|
|
|
|
| 88.6% |
Uncovered Elements: 4 (35) |
Complexity: 8 |
Complexity Density: 0.3 |
|
1039 |
21
|
public final void visitEnter(final ElementList list) throws ModuleDataException {... |
1040 |
21
|
final String operator = list.getOperator(); |
1041 |
21
|
enter(operator); |
1042 |
21
|
final String method = "visitEnter(ElementList)"; |
1043 |
21
|
Trace.param(CLASS, this, method, "current", current); |
1044 |
21
|
String context = traverser.getCurrentContext().getLocationWithinModule(); |
1045 |
|
|
1046 |
|
|
1047 |
21
|
if (context.startsWith(find.getLocationWithinModule())) { |
1048 |
2
|
throw new LocationFoundException(find); |
1049 |
|
} |
1050 |
|
|
1051 |
19
|
checkMatching(method); |
1052 |
|
|
1053 |
19
|
traverser.setLocationWithinModule(context + ".getOperator()"); |
1054 |
19
|
checkIfFound(); |
1055 |
19
|
traverser.setLocationWithinModule(context); |
1056 |
19
|
final boolean firstIsAtom = list.size() > 0 && list.getElement(0).isAtom(); |
1057 |
19
|
if (firstIsAtom) { |
1058 |
10
|
traverser.setLocationWithinModule(context + ".getElement(0)"); |
1059 |
10
|
if ("VAR".equals(operator) || "PREDVAR".equals(operator) |
1060 |
|
|| "FUNVAR".equals(operator)) { |
1061 |
4
|
current.setAttribute("id"); |
1062 |
4
|
checkIfFound(); |
1063 |
4
|
traverser.setLocationWithinModule(context + ".getElement(0).getAtom()"); |
1064 |
4
|
checkIfFound(); |
1065 |
6
|
} else if ("PREDCON".equals(operator) || "FUNCON".equals(operator)) { |
1066 |
6
|
current.setAttribute("ref"); |
1067 |
6
|
checkIfFound(); |
1068 |
2
|
traverser.setLocationWithinModule(context + ".getElement(0).getAtom()"); |
1069 |
2
|
checkIfFound(); |
1070 |
|
} else { |
1071 |
0
|
current.setAttribute(null); |
1072 |
0
|
Trace.info(CLASS, this, method, "unknown operator " + operator); |
1073 |
0
|
throw new LocationFoundException(traverser.getCurrentContext()); |
1074 |
|
} |
1075 |
|
} |
1076 |
|
} |
1077 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1078 |
6
|
public final void visitLeave(final ElementList list) {... |
1079 |
6
|
leave(); |
1080 |
|
} |
1081 |
|
|
1082 |
|
|
1083 |
|
|
1084 |
|
|
1085 |
|
|
1086 |
|
|
1087 |
|
|
1088 |
|
|
1089 |
|
|
1090 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
1091 |
0
|
public final void visitEnter(final LiteratureItemList list) throws ModuleDataException {... |
1092 |
0
|
enter("BIBLIOGRAPHY"); |
1093 |
0
|
final String method = "visitEnter(LiteratureItemList)"; |
1094 |
0
|
Trace.param(CLASS, this, method, "current", current); |
1095 |
0
|
checkMatching(method); |
1096 |
|
} |
1097 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1098 |
0
|
public final void visitLeave(final LiteratureItemList list) {... |
1099 |
0
|
leave(); |
1100 |
|
} |
1101 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
1102 |
0
|
public final void visitEnter(final LiteratureItem item) throws ModuleDataException {... |
1103 |
0
|
enter("ITEM"); |
1104 |
0
|
final String method = "visitEnter(LiteratureItem)"; |
1105 |
0
|
Trace.param(CLASS, this, method, "current", current); |
1106 |
0
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
1107 |
0
|
checkMatching(method); |
1108 |
|
|
1109 |
0
|
traverser.setLocationWithinModule(context + ".getLabel()"); |
1110 |
0
|
current.setAttribute("label"); |
1111 |
0
|
checkIfFound(); |
1112 |
|
} |
1113 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1114 |
0
|
public final void visitLeave(final LiteratureItem item) {... |
1115 |
0
|
leave(); |
1116 |
|
} |
1117 |
|
|
1118 |
|
|
1119 |
|
|
1120 |
|
|
1121 |
|
@throws |
1122 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
1123 |
371
|
private final void checkIfFound() throws LocationFoundException {... |
1124 |
371
|
if (find.getLocationWithinModule().equals(traverser.getCurrentContext() |
1125 |
|
.getLocationWithinModule())) { |
1126 |
10
|
throw new LocationFoundException(traverser.getCurrentContext()); |
1127 |
|
} |
1128 |
|
} |
1129 |
|
|
1130 |
|
|
1131 |
|
|
1132 |
|
|
1133 |
|
@link |
1134 |
|
|
1135 |
|
@link |
1136 |
|
|
1137 |
|
@param |
1138 |
|
@throws |
1139 |
|
@throws |
1140 |
|
|
|
|
| 90.9% |
Uncovered Elements: 3 (33) |
Complexity: 6 |
Complexity Density: 0.26 |
|
1141 |
222
|
private final void checkMatching(final String method)... |
1142 |
|
throws LocationNotFoundException, LocationFoundException { |
1143 |
222
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
1144 |
222
|
if (find.getLocationWithinModule().startsWith(context)) { |
1145 |
113
|
Trace.info(CLASS, this, method, "beginning matches"); |
1146 |
113
|
Trace.paramInfo(CLASS, this, method, "context", context); |
1147 |
113
|
matching = true; |
1148 |
113
|
matchingBegin = context; |
1149 |
113
|
matchingPath = new SimpleXPath(current); |
1150 |
|
} else { |
1151 |
109
|
if (context.startsWith(find.getLocationWithinModule())) { |
1152 |
|
|
1153 |
|
|
1154 |
1
|
throw new LocationFoundException(traverser.getCurrentContext()); |
1155 |
|
} |
1156 |
108
|
if (matching) { |
1157 |
|
|
1158 |
|
|
1159 |
|
|
1160 |
|
|
1161 |
|
|
1162 |
|
|
1163 |
108
|
if (!context.startsWith(matchingBegin)) { |
1164 |
|
|
1165 |
|
|
1166 |
|
|
1167 |
|
|
1168 |
1
|
Trace.info(CLASS, this, method, "matching lost, when finding error location"); |
1169 |
1
|
Trace.paramInfo(CLASS, this, method, "last match ", matchingBegin); |
1170 |
1
|
Trace.paramInfo(CLASS, this, method, "current context", context); |
1171 |
1
|
Trace.paramInfo(CLASS, this, method, "find context ", find.getLocationWithinModule()); |
1172 |
|
|
1173 |
1
|
Trace.traceStack(CLASS, this, method); |
1174 |
1
|
Trace.info(CLASS, this, method, "changing XPath to last matching one"); |
1175 |
|
|
1176 |
|
|
1177 |
1
|
if (Boolean.TRUE.toString().equalsIgnoreCase( |
1178 |
|
System.getProperty("qedeq.test.xmlLocationFailures"))) { |
1179 |
0
|
throw new LocationNotFoundException(traverser.getCurrentContext(), |
1180 |
|
matchingBegin, find.getLocationWithinModule()); |
1181 |
|
} |
1182 |
|
|
1183 |
|
|
1184 |
|
|
1185 |
|
|
1186 |
1
|
current = matchingPath; |
1187 |
1
|
throw new LocationFoundException(new ModuleContext(find.getModuleLocation(), |
1188 |
|
matchingBegin)); |
1189 |
|
} |
1190 |
|
} |
1191 |
107
|
traverser.setBlocked(true); |
1192 |
|
} |
1193 |
220
|
checkIfFound(); |
1194 |
|
} |
1195 |
|
|
1196 |
|
|
1197 |
|
|
1198 |
|
|
1199 |
|
@param |
1200 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
1201 |
202
|
private final void enter(final String element) {... |
1202 |
202
|
level++; |
1203 |
202
|
current.addElement(element, addOccurence(element)); |
1204 |
|
} |
1205 |
|
|
1206 |
|
|
1207 |
|
|
1208 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
1209 |
115
|
private final void leave() {... |
1210 |
115
|
level--; |
1211 |
115
|
current.deleteLastElement(); |
1212 |
115
|
traverser.setBlocked(false); |
1213 |
|
} |
1214 |
|
|
1215 |
|
|
1216 |
|
|
1217 |
|
|
1218 |
|
|
1219 |
|
|
1220 |
|
|
1221 |
|
|
1222 |
|
@param |
1223 |
|
@return |
1224 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (18) |
Complexity: 4 |
Complexity Density: 0.33 |
|
1225 |
202
|
private final int addOccurence(final String name) {... |
1226 |
204
|
while (level < elements.size()) { |
1227 |
2
|
elements.remove(elements.size() - 1); |
1228 |
|
} |
1229 |
296
|
while (level > elements.size()) { |
1230 |
94
|
elements.add(new HashMap()); |
1231 |
|
} |
1232 |
202
|
final Map levelMap = (Map) elements.get(level - 1); |
1233 |
202
|
final Enumerator counter; |
1234 |
202
|
if (levelMap.containsKey(name)) { |
1235 |
18
|
counter = (Enumerator) levelMap.get(name); |
1236 |
18
|
counter.increaseNumber(); |
1237 |
|
} else { |
1238 |
184
|
counter = new Enumerator(1); |
1239 |
184
|
levelMap.put(name, counter); |
1240 |
|
} |
1241 |
202
|
return counter.getNumber(); |
1242 |
|
} |
1243 |
|
|
1244 |
|
} |