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