1 | /* | |
2 | * Copyright 2006 - 2013 | |
3 | * Stefan Balev <stefan.balev@graphstream-project.org> | |
4 | * Julien Baudry <julien.baudry@graphstream-project.org> | |
5 | * Antoine Dutot <antoine.dutot@graphstream-project.org> | |
6 | * Yoann Pign�� <yoann.pigne@graphstream-project.org> | |
7 | * Guilhelm Savin <guilhelm.savin@graphstream-project.org> | |
8 | * | |
9 | * This file is part of GraphStream <http://graphstream-project.org>. | |
10 | * | |
11 | * GraphStream is a library whose purpose is to handle static or dynamic | |
12 | * graph, create them from scratch, file or any source and display them. | |
13 | * | |
14 | * This program is free software distributed under the terms of two licenses, the | |
15 | * CeCILL-C license that fits European law, and the GNU Lesser General Public | |
16 | * License. You can use, modify and/ or redistribute the software under the terms | |
17 | * of the CeCILL-C license as circulated by CEA, CNRS and INRIA at the following | |
18 | * URL <http://www.cecill.info> or under the terms of the GNU LGPL as published by | |
19 | * the Free Software Foundation, either version 3 of the License, or (at your | |
20 | * option) any later version. | |
21 | * | |
22 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY | |
23 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
24 | * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | |
25 | * | |
26 | * You should have received a copy of the GNU Lesser General Public License | |
27 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
28 | * | |
29 | * The fact that you are presently reading this means that you have had | |
30 | * knowledge of the CeCILL-C and LGPL licenses and that you accept their terms. | |
31 | */ | |
32 | package org.graphstream.stream.file.gml; | |
33 | ||
34 | import java.io.InputStream; | |
35 | import java.io.IOException; | |
36 | import java.io.Reader; | |
37 | ||
38 | import org.graphstream.stream.file.FileSourceGML; | |
39 | ||
40 | import org.graphstream.util.parser.ParseException; | |
41 | import org.graphstream.util.parser.Parser; | |
42 | import org.graphstream.util.parser.SimpleCharStream; | |
43 | import org.graphstream.util.parser.Token; | |
44 | import org.graphstream.util.parser.TokenMgrError; | |
45 | ||
46 | @SuppressWarnings("unused") | |
47 | public class GMLParser implements Parser, GMLParserConstants { | |
48 | boolean inGraph = false; | |
49 | GMLContext ctx; | |
50 | boolean step; | |
51 | ||
52 | public GMLParser(FileSourceGML gml, InputStream stream) { | |
53 | this(stream); | |
54 | this.ctx = new GMLContext(gml); | |
55 | } | |
56 | ||
57 | public GMLParser(FileSourceGML gml, Reader stream) { | |
58 | this(stream); | |
59 | this.ctx = new GMLContext(gml); | |
60 | } | |
61 | ||
62 | public boolean isInGraph() { | |
63 |
1
1. isInGraph : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return inGraph; |
64 | } | |
65 | ||
66 | public void open() throws IOException, ParseException { | |
67 | } | |
68 | ||
69 | public boolean next() throws IOException, ParseException { | |
70 | KeyValues kv = null; | |
71 | kv = nextEvents(); | |
72 |
1
1. next : removed call to org/graphstream/stream/file/gml/GMLContext::handleKeyValues → NO_COVERAGE |
ctx.handleKeyValues(kv); |
73 | ||
74 |
3
1. next : negated conditional → NO_COVERAGE 2. next : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE 3. next : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return (kv != null); |
75 | } | |
76 | ||
77 | public boolean step() throws IOException, ParseException { | |
78 | KeyValues kv = null; | |
79 | step = false; | |
80 | ||
81 |
2
1. step : negated conditional → NO_COVERAGE 2. step : negated conditional → NO_COVERAGE |
while ((kv = nextEvents()) != null && !step) |
82 |
1
1. step : removed call to org/graphstream/stream/file/gml/GMLContext::handleKeyValues → NO_COVERAGE |
ctx.handleKeyValues(kv); |
83 | ||
84 |
1
1. step : negated conditional → NO_COVERAGE |
if (kv != null) |
85 |
1
1. step : removed call to org/graphstream/stream/file/gml/GMLContext::setNextStep → NO_COVERAGE |
ctx.setNextStep(kv); |
86 | ||
87 |
3
1. step : negated conditional → NO_COVERAGE 2. step : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE 3. step : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return (kv != null); |
88 | } | |
89 | ||
90 | /** | |
91 | * Closes the parser, closing the opened stream. | |
92 | */ | |
93 | public void close() throws IOException { | |
94 |
1
1. close : removed call to org/graphstream/util/parser/SimpleCharStream::close → NO_COVERAGE |
jj_input_stream.close(); |
95 | } | |
96 | ||
97 | /*****************************************************************/ | |
98 | /* The parser. */ | |
99 | /*****************************************************************/ | |
100 | ||
101 | /** Unused rule, call it to slurp in the whole file. */ | |
102 | final public void start() throws ParseException { | |
103 | list(); | |
104 | } | |
105 | ||
106 | final public void all() throws ParseException, IOException { | |
107 | KeyValues values = new KeyValues(); | |
108 | String key; | |
109 |
1
1. all : negated conditional → NO_COVERAGE |
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { |
110 | case GRAPH: | |
111 |
1
1. all : removed call to org/graphstream/stream/file/gml/GMLParser::graphStart → NO_COVERAGE |
graphStart(); |
112 |
1
1. all : removed call to org/graphstream/stream/file/gml/GMLContext::setIsInGraph → NO_COVERAGE |
ctx.setIsInGraph(true); |
113 |
1
1. all : removed call to org/graphstream/stream/file/gml/GMLContext::setDirected → NO_COVERAGE |
ctx.setDirected(false); |
114 | break; | |
115 | case DIGRAPH: | |
116 |
1
1. all : removed call to org/graphstream/stream/file/gml/GMLParser::diGraphStart → NO_COVERAGE |
diGraphStart(); |
117 |
1
1. all : removed call to org/graphstream/stream/file/gml/GMLContext::setIsInGraph → NO_COVERAGE |
ctx.setIsInGraph(true); |
118 |
1
1. all : removed call to org/graphstream/stream/file/gml/GMLContext::setDirected → NO_COVERAGE |
ctx.setDirected(true); |
119 | break; | |
120 | default: | |
121 | jj_la1[0] = jj_gen; | |
122 | jj_consume_token(-1); | |
123 | throw new ParseException(); | |
124 | } | |
125 | label_1: while (true) { | |
126 |
1
1. all : negated conditional → NO_COVERAGE |
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { |
127 | case STRING: | |
128 | case KEY: | |
129 | case COMMENT: | |
130 | ; | |
131 | break; | |
132 | default: | |
133 | jj_la1[1] = jj_gen; | |
134 | break label_1; | |
135 | } | |
136 | key = keyValue(values); | |
137 | values.key = key; | |
138 |
1
1. all : removed call to org/graphstream/stream/file/gml/GMLContext::handleKeyValues → NO_COVERAGE |
ctx.handleKeyValues(values); |
139 |
1
1. all : removed call to org/graphstream/stream/file/gml/KeyValues::clear → NO_COVERAGE |
values.clear(); |
140 | } | |
141 |
1
1. all : removed call to org/graphstream/stream/file/gml/GMLParser::graphEnd → NO_COVERAGE |
graphEnd(); |
142 | values.key = null; | |
143 | inGraph = false; | |
144 | jj_consume_token(0); | |
145 | } | |
146 | ||
147 | final public void graphStart() throws ParseException { | |
148 | jj_consume_token(GRAPH); | |
149 | jj_consume_token(LSQBR); | |
150 | } | |
151 | ||
152 | final public void diGraphStart() throws ParseException { | |
153 | jj_consume_token(DIGRAPH); | |
154 | jj_consume_token(LSQBR); | |
155 | } | |
156 | ||
157 | final public void graphEnd() throws ParseException { | |
158 | jj_consume_token(RSQBR); | |
159 | } | |
160 | ||
161 | /** | |
162 | * The top-level method to be called by the file source. Returns a set of | |
163 | * top-level key values or null if the end of the file was reached. | |
164 | * | |
165 | * Top-level key values are nodes and edges as well as all key-values | |
166 | * defined before and after the graph. | |
167 | */ | |
168 | final public KeyValues nextEvents() throws ParseException { | |
169 | KeyValues values = new KeyValues(); | |
170 | String key; | |
171 |
1
1. nextEvents : negated conditional → NO_COVERAGE |
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { |
172 | case GRAPH: | |
173 |
1
1. nextEvents : removed call to org/graphstream/stream/file/gml/GMLParser::graphStart → NO_COVERAGE |
graphStart(); |
174 | values.key = null; | |
175 |
1
1. nextEvents : removed call to org/graphstream/stream/file/gml/GMLContext::setIsInGraph → NO_COVERAGE |
ctx.setIsInGraph(true); |
176 |
1
1. nextEvents : removed call to org/graphstream/stream/file/gml/GMLContext::setDirected → NO_COVERAGE |
ctx.setDirected(false); |
177 | break; | |
178 | case DIGRAPH: | |
179 |
1
1. nextEvents : removed call to org/graphstream/stream/file/gml/GMLParser::diGraphStart → NO_COVERAGE |
diGraphStart(); |
180 | values.key = null; | |
181 |
1
1. nextEvents : removed call to org/graphstream/stream/file/gml/GMLContext::setIsInGraph → NO_COVERAGE |
ctx.setIsInGraph(true); |
182 |
1
1. nextEvents : removed call to org/graphstream/stream/file/gml/GMLContext::setDirected → NO_COVERAGE |
ctx.setDirected(true); |
183 | break; | |
184 | case RSQBR: | |
185 |
1
1. nextEvents : removed call to org/graphstream/stream/file/gml/GMLParser::graphEnd → NO_COVERAGE |
graphEnd(); |
186 | values.key = null; | |
187 |
1
1. nextEvents : removed call to org/graphstream/stream/file/gml/GMLContext::setIsInGraph → NO_COVERAGE |
ctx.setIsInGraph(false); |
188 | break; | |
189 | case STRING: | |
190 | case KEY: | |
191 | case COMMENT: | |
192 | key = keyValue(values); | |
193 | values.key = key; | |
194 | break; | |
195 | case 0: | |
196 | jj_consume_token(0); | |
197 | values = null; | |
198 | break; | |
199 | default: | |
200 | jj_la1[2] = jj_gen; | |
201 | jj_consume_token(-1); | |
202 | throw new ParseException(); | |
203 | } | |
204 | { | |
205 | if (true) | |
206 |
1
1. nextEvents : mutated return of Object value for org/graphstream/stream/file/gml/GMLParser::nextEvents to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return values; |
207 | } | |
208 | throw new Error("Missing return statement in function"); | |
209 | } | |
210 | ||
211 | /** | |
212 | * A list of key values, all values are stored in a KeyValues object. | |
213 | */ | |
214 | final public KeyValues list() throws ParseException { | |
215 | KeyValues values = new KeyValues(); | |
216 | label_2: while (true) { | |
217 |
1
1. list : negated conditional → NO_COVERAGE |
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { |
218 | case STRING: | |
219 | case KEY: | |
220 | case COMMENT: | |
221 | ; | |
222 | break; | |
223 | default: | |
224 | jj_la1[3] = jj_gen; | |
225 | break label_2; | |
226 | } | |
227 | keyValue(values); | |
228 | } | |
229 | { | |
230 | if (true) | |
231 |
1
1. list : mutated return of Object value for org/graphstream/stream/file/gml/GMLParser::list to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return values; |
232 | } | |
233 | throw new Error("Missing return statement in function"); | |
234 | } | |
235 | ||
236 | /** | |
237 | * A set of key and value, the value can recursively be a list of | |
238 | * key-values. Only the key-value list "graph [ ... ]" is not parsed by this | |
239 | * rule, and parsed by another rules, so that the nextEvent() rule can be | |
240 | * called repeatedly. | |
241 | */ | |
242 | final public String keyValue(KeyValues values) throws ParseException { | |
243 | Token k; | |
244 | String key; | |
245 | Object v; | |
246 | boolean isGraph = false; | |
247 | label_3: while (true) { | |
248 |
1
1. keyValue : negated conditional → NO_COVERAGE |
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { |
249 | case COMMENT: | |
250 | ; | |
251 | break; | |
252 | default: | |
253 | jj_la1[4] = jj_gen; | |
254 | break label_3; | |
255 | } | |
256 | jj_consume_token(COMMENT); | |
257 | } | |
258 |
1
1. keyValue : negated conditional → NO_COVERAGE |
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { |
259 | case KEY: | |
260 | k = jj_consume_token(KEY); | |
261 | key = k.image; | |
262 |
1
1. keyValue : negated conditional → NO_COVERAGE |
if (key.equalsIgnoreCase("step")) |
263 | step = true; | |
264 | break; | |
265 | case STRING: | |
266 | k = jj_consume_token(STRING); | |
267 |
1
1. keyValue : Replaced integer subtraction with addition → NO_COVERAGE |
key = k.image.substring(1, k.image.length() - 2); |
268 | break; | |
269 | default: | |
270 | jj_la1[5] = jj_gen; | |
271 | jj_consume_token(-1); | |
272 | throw new ParseException(); | |
273 | } | |
274 | v = value(key); | |
275 | values.put(key, v); | |
276 | values.line = k.beginLine; | |
277 | values.column = k.beginColumn; | |
278 | { | |
279 | if (true) | |
280 |
1
1. keyValue : mutated return of Object value for org/graphstream/stream/file/gml/GMLParser::keyValue to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return key; |
281 | } | |
282 | throw new Error("Missing return statement in function"); | |
283 | } | |
284 | ||
285 | /** | |
286 | * A value for a key, either a number, a string or a recursive list of | |
287 | * key-values. | |
288 | */ | |
289 | final public Object value(String key) throws ParseException { | |
290 | Token t; | |
291 | Object val; | |
292 | KeyValues kv; | |
293 |
1
1. value : negated conditional → NO_COVERAGE |
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { |
294 | case REAL: | |
295 | t = jj_consume_token(REAL); | |
296 |
2
1. value : changed conditional boundary → NO_COVERAGE 2. value : negated conditional → NO_COVERAGE |
if (t.image.indexOf('.') < 0) |
297 | val = Integer.valueOf(t.image); | |
298 | else | |
299 | val = Double.valueOf(t.image); | |
300 | break; | |
301 | case STRING: | |
302 | t = jj_consume_token(STRING); | |
303 |
1
1. value : Replaced integer subtraction with addition → NO_COVERAGE |
val = t.image.substring(1, t.image.length() - 1); |
304 | break; | |
305 | case KEY: | |
306 | t = jj_consume_token(KEY); | |
307 | val = t.image; | |
308 | break; | |
309 | case LSQBR: | |
310 | jj_consume_token(LSQBR); | |
311 | kv = list(); | |
312 | val = kv; | |
313 | jj_consume_token(RSQBR); | |
314 | break; | |
315 | default: | |
316 | jj_la1[6] = jj_gen; | |
317 | jj_consume_token(-1); | |
318 | throw new ParseException(); | |
319 | } | |
320 | { | |
321 | if (true) | |
322 |
1
1. value : mutated return of Object value for org/graphstream/stream/file/gml/GMLParser::value to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return val; |
323 | } | |
324 | throw new Error("Missing return statement in function"); | |
325 | } | |
326 | ||
327 | /** Generated Token Manager. */ | |
328 | public GMLParserTokenManager token_source; | |
329 | SimpleCharStream jj_input_stream; | |
330 | /** Current token. */ | |
331 | public Token token; | |
332 | /** Next token. */ | |
333 | public Token jj_nt; | |
334 | private int jj_ntk; | |
335 | private int jj_gen; | |
336 | final private int[] jj_la1 = new int[7]; | |
337 | static private int[] jj_la1_0; | |
338 | static { | |
339 | jj_la1_init_0(); | |
340 | } | |
341 | ||
342 | private static void jj_la1_init_0() { | |
343 | jj_la1_0 = new int[] { 0x3000, 0xc800, 0xfa01, 0xc800, 0x8000, 0x4800, | |
344 | 0x4d00, }; | |
345 | } | |
346 | ||
347 | /** Constructor with InputStream. */ | |
348 | public GMLParser(java.io.InputStream stream) { | |
349 | this(stream, null); | |
350 | } | |
351 | ||
352 | /** Constructor with InputStream and supplied encoding */ | |
353 | public GMLParser(java.io.InputStream stream, String encoding) { | |
354 | try { | |
355 | jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); | |
356 | } catch (java.io.UnsupportedEncodingException e) { | |
357 | throw new RuntimeException(e); | |
358 | } | |
359 | token_source = new GMLParserTokenManager(jj_input_stream); | |
360 | token = new Token(); | |
361 | jj_ntk = -1; | |
362 | jj_gen = 0; | |
363 |
3
1. 2. 3. |
for (int i = 0; i < 7; i++) |
364 | jj_la1[i] = -1; | |
365 | } | |
366 | ||
367 | /** Reinitialise. */ | |
368 | public void ReInit(java.io.InputStream stream) { | |
369 |
1
1. ReInit : removed call to org/graphstream/stream/file/gml/GMLParser::ReInit → NO_COVERAGE |
ReInit(stream, null); |
370 | } | |
371 | ||
372 | /** Reinitialise. */ | |
373 | public void ReInit(java.io.InputStream stream, String encoding) { | |
374 | try { | |
375 |
1
1. ReInit : removed call to org/graphstream/util/parser/SimpleCharStream::ReInit → NO_COVERAGE |
jj_input_stream.ReInit(stream, encoding, 1, 1); |
376 | } catch (java.io.UnsupportedEncodingException e) { | |
377 | throw new RuntimeException(e); | |
378 | } | |
379 |
1
1. ReInit : removed call to org/graphstream/stream/file/gml/GMLParserTokenManager::ReInit → NO_COVERAGE |
token_source.ReInit(jj_input_stream); |
380 | token = new Token(); | |
381 | jj_ntk = -1; | |
382 | jj_gen = 0; | |
383 |
3
1. ReInit : changed conditional boundary → NO_COVERAGE 2. ReInit : Changed increment from 1 to -1 → NO_COVERAGE 3. ReInit : negated conditional → NO_COVERAGE |
for (int i = 0; i < 7; i++) |
384 | jj_la1[i] = -1; | |
385 | } | |
386 | ||
387 | /** Constructor. */ | |
388 | public GMLParser(java.io.Reader stream) { | |
389 | jj_input_stream = new SimpleCharStream(stream, 1, 1); | |
390 | token_source = new GMLParserTokenManager(jj_input_stream); | |
391 | token = new Token(); | |
392 | jj_ntk = -1; | |
393 | jj_gen = 0; | |
394 |
3
1. 2. 3. |
for (int i = 0; i < 7; i++) |
395 | jj_la1[i] = -1; | |
396 | } | |
397 | ||
398 | /** Reinitialise. */ | |
399 | public void ReInit(java.io.Reader stream) { | |
400 |
1
1. ReInit : removed call to org/graphstream/util/parser/SimpleCharStream::ReInit → NO_COVERAGE |
jj_input_stream.ReInit(stream, 1, 1); |
401 |
1
1. ReInit : removed call to org/graphstream/stream/file/gml/GMLParserTokenManager::ReInit → NO_COVERAGE |
token_source.ReInit(jj_input_stream); |
402 | token = new Token(); | |
403 | jj_ntk = -1; | |
404 | jj_gen = 0; | |
405 |
3
1. ReInit : changed conditional boundary → NO_COVERAGE 2. ReInit : Changed increment from 1 to -1 → NO_COVERAGE 3. ReInit : negated conditional → NO_COVERAGE |
for (int i = 0; i < 7; i++) |
406 | jj_la1[i] = -1; | |
407 | } | |
408 | ||
409 | /** Constructor with generated Token Manager. */ | |
410 | public GMLParser(GMLParserTokenManager tm) { | |
411 | token_source = tm; | |
412 | token = new Token(); | |
413 | jj_ntk = -1; | |
414 | jj_gen = 0; | |
415 |
3
1. 2. 3. |
for (int i = 0; i < 7; i++) |
416 | jj_la1[i] = -1; | |
417 | } | |
418 | ||
419 | /** Reinitialise. */ | |
420 | public void ReInit(GMLParserTokenManager tm) { | |
421 | token_source = tm; | |
422 | token = new Token(); | |
423 | jj_ntk = -1; | |
424 | jj_gen = 0; | |
425 |
3
1. ReInit : changed conditional boundary → NO_COVERAGE 2. ReInit : Changed increment from 1 to -1 → NO_COVERAGE 3. ReInit : negated conditional → NO_COVERAGE |
for (int i = 0; i < 7; i++) |
426 | jj_la1[i] = -1; | |
427 | } | |
428 | ||
429 | private Token jj_consume_token(int kind) throws ParseException { | |
430 | Token oldToken; | |
431 |
1
1. jj_consume_token : negated conditional → NO_COVERAGE |
if ((oldToken = token).next != null) |
432 | token = token.next; | |
433 | else | |
434 | token = token.next = token_source.getNextToken(); | |
435 | jj_ntk = -1; | |
436 |
1
1. jj_consume_token : negated conditional → NO_COVERAGE |
if (token.kind == kind) { |
437 |
1
1. jj_consume_token : Replaced integer addition with subtraction → NO_COVERAGE |
jj_gen++; |
438 |
1
1. jj_consume_token : mutated return of Object value for org/graphstream/stream/file/gml/GMLParser::jj_consume_token to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return token; |
439 | } | |
440 | token = oldToken; | |
441 | jj_kind = kind; | |
442 | throw generateParseException(); | |
443 | } | |
444 | ||
445 | /** Get the next Token. */ | |
446 | final public Token getNextToken() { | |
447 |
1
1. getNextToken : negated conditional → NO_COVERAGE |
if (token.next != null) |
448 | token = token.next; | |
449 | else | |
450 | token = token.next = token_source.getNextToken(); | |
451 | jj_ntk = -1; | |
452 |
1
1. getNextToken : Replaced integer addition with subtraction → NO_COVERAGE |
jj_gen++; |
453 |
1
1. getNextToken : mutated return of Object value for org/graphstream/stream/file/gml/GMLParser::getNextToken to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return token; |
454 | } | |
455 | ||
456 | /** Get the specific Token. */ | |
457 | final public Token getToken(int index) { | |
458 | Token t = token; | |
459 |
3
1. getToken : changed conditional boundary → NO_COVERAGE 2. getToken : Changed increment from 1 to -1 → NO_COVERAGE 3. getToken : negated conditional → NO_COVERAGE |
for (int i = 0; i < index; i++) { |
460 |
1
1. getToken : negated conditional → NO_COVERAGE |
if (t.next != null) |
461 | t = t.next; | |
462 | else | |
463 | t = t.next = token_source.getNextToken(); | |
464 | } | |
465 |
1
1. getToken : mutated return of Object value for org/graphstream/stream/file/gml/GMLParser::getToken to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return t; |
466 | } | |
467 | ||
468 | private int jj_ntk() { | |
469 |
1
1. jj_ntk : negated conditional → NO_COVERAGE |
if ((jj_nt = token.next) == null) |
470 |
1
1. jj_ntk : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return (jj_ntk = (token.next = token_source.getNextToken()).kind); |
471 | else | |
472 |
1
1. jj_ntk : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return (jj_ntk = jj_nt.kind); |
473 | } | |
474 | ||
475 | private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>(); | |
476 | private int[] jj_expentry; | |
477 | private int jj_kind = -1; | |
478 | ||
479 | /** Generate ParseException. */ | |
480 | public ParseException generateParseException() { | |
481 |
1
1. generateParseException : removed call to java/util/List::clear → NO_COVERAGE |
jj_expentries.clear(); |
482 | boolean[] la1tokens = new boolean[16]; | |
483 |
2
1. generateParseException : changed conditional boundary → NO_COVERAGE 2. generateParseException : negated conditional → NO_COVERAGE |
if (jj_kind >= 0) { |
484 | la1tokens[jj_kind] = true; | |
485 | jj_kind = -1; | |
486 | } | |
487 |
3
1. generateParseException : changed conditional boundary → NO_COVERAGE 2. generateParseException : Changed increment from 1 to -1 → NO_COVERAGE 3. generateParseException : negated conditional → NO_COVERAGE |
for (int i = 0; i < 7; i++) { |
488 |
1
1. generateParseException : negated conditional → NO_COVERAGE |
if (jj_la1[i] == jj_gen) { |
489 |
3
1. generateParseException : changed conditional boundary → NO_COVERAGE 2. generateParseException : Changed increment from 1 to -1 → NO_COVERAGE 3. generateParseException : negated conditional → NO_COVERAGE |
for (int j = 0; j < 32; j++) { |
490 |
3
1. generateParseException : Replaced Shift Left with Shift Right → NO_COVERAGE 2. generateParseException : Replaced bitwise AND with OR → NO_COVERAGE 3. generateParseException : negated conditional → NO_COVERAGE |
if ((jj_la1_0[i] & (1 << j)) != 0) { |
491 | la1tokens[j] = true; | |
492 | } | |
493 | } | |
494 | } | |
495 | } | |
496 |
3
1. generateParseException : changed conditional boundary → NO_COVERAGE 2. generateParseException : Changed increment from 1 to -1 → NO_COVERAGE 3. generateParseException : negated conditional → NO_COVERAGE |
for (int i = 0; i < 16; i++) { |
497 |
1
1. generateParseException : negated conditional → NO_COVERAGE |
if (la1tokens[i]) { |
498 | jj_expentry = new int[1]; | |
499 | jj_expentry[0] = i; | |
500 | jj_expentries.add(jj_expentry); | |
501 | } | |
502 | } | |
503 | int[][] exptokseq = new int[jj_expentries.size()][]; | |
504 |
3
1. generateParseException : changed conditional boundary → NO_COVERAGE 2. generateParseException : Changed increment from 1 to -1 → NO_COVERAGE 3. generateParseException : negated conditional → NO_COVERAGE |
for (int i = 0; i < jj_expentries.size(); i++) { |
505 | exptokseq[i] = jj_expentries.get(i); | |
506 | } | |
507 |
1
1. generateParseException : mutated return of Object value for org/graphstream/stream/file/gml/GMLParser::generateParseException to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return new ParseException(token, exptokseq, tokenImage); |
508 | } | |
509 | ||
510 | /** Enable tracing. */ | |
511 | final public void enable_tracing() { | |
512 | } | |
513 | ||
514 | /** Disable tracing. */ | |
515 | final public void disable_tracing() { | |
516 | } | |
517 | ||
518 | } | |
Mutations | ||
63 |
1.1 |
|
72 |
1.1 |
|
74 |
1.1 2.2 3.3 |
|
81 |
1.1 2.2 |
|
82 |
1.1 |
|
84 |
1.1 |
|
85 |
1.1 |
|
87 |
1.1 2.2 3.3 |
|
94 |
1.1 |
|
109 |
1.1 |
|
111 |
1.1 |
|
112 |
1.1 |
|
113 |
1.1 |
|
116 |
1.1 |
|
117 |
1.1 |
|
118 |
1.1 |
|
126 |
1.1 |
|
138 |
1.1 |
|
139 |
1.1 |
|
141 |
1.1 |
|
171 |
1.1 |
|
173 |
1.1 |
|
175 |
1.1 |
|
176 |
1.1 |
|
179 |
1.1 |
|
181 |
1.1 |
|
182 |
1.1 |
|
185 |
1.1 |
|
187 |
1.1 |
|
206 |
1.1 |
|
217 |
1.1 |
|
231 |
1.1 |
|
248 |
1.1 |
|
258 |
1.1 |
|
262 |
1.1 |
|
267 |
1.1 |
|
280 |
1.1 |
|
293 |
1.1 |
|
296 |
1.1 2.2 |
|
303 |
1.1 |
|
322 |
1.1 |
|
363 |
1.1 2.2 3.3 |
|
369 |
1.1 |
|
375 |
1.1 |
|
379 |
1.1 |
|
383 |
1.1 2.2 3.3 |
|
394 |
1.1 2.2 3.3 |
|
400 |
1.1 |
|
401 |
1.1 |
|
405 |
1.1 2.2 3.3 |
|
415 |
1.1 2.2 3.3 |
|
425 |
1.1 2.2 3.3 |
|
431 |
1.1 |
|
436 |
1.1 |
|
437 |
1.1 |
|
438 |
1.1 |
|
447 |
1.1 |
|
452 |
1.1 |
|
453 |
1.1 |
|
459 |
1.1 2.2 3.3 |
|
460 |
1.1 |
|
465 |
1.1 |
|
469 |
1.1 |
|
470 |
1.1 |
|
472 |
1.1 |
|
481 |
1.1 |
|
483 |
1.1 2.2 |
|
487 |
1.1 2.2 3.3 |
|
488 |
1.1 |
|
489 |
1.1 2.2 3.3 |
|
490 |
1.1 2.2 3.3 |
|
496 |
1.1 2.2 3.3 |
|
497 |
1.1 |
|
504 |
1.1 2.2 3.3 |
|
507 |
1.1 |