DGSParser.java

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.dgs;
33
34
import java.awt.Color;
35
import java.io.IOException;
36
import java.io.Reader;
37
import java.util.HashMap;
38
import java.util.LinkedList;
39
40
import org.graphstream.graph.implementations.AbstractElement.AttributeChangeEvent;
41
import org.graphstream.stream.SourceBase.ElementType;
42
import org.graphstream.stream.file.FileSourceDGS;
43
import org.graphstream.util.parser.ParseException;
44
import org.graphstream.util.parser.Parser;
45
46
// import org.graphstream.util.time.ISODateIO;
47
48
public class DGSParser implements Parser {
49
	static enum Token {
50
		AN, CN, DN, AE, CE, DE, CG, ST, CL, TF, EOF
51
	}
52
53
	protected static final int BUFFER_SIZE = 4096;
54
55
	public static final int ARRAY_OPEN = '{';
56
	public static final int ARRAY_CLOSE = '}';
57
58
	public static final int MAP_OPEN = '[';
59
	public static final int MAP_CLOSE = ']';
60
61
	Reader reader;
62
	int line, column;
63
	int bufferCapacity, bufferPosition;
64
	char[] buffer;
65
	int[] pushback;
66
	int pushbackOffset;
67
	FileSourceDGS dgs;
68
	String sourceId;
69
	Token lastDirective;
70
71
	// ISODateIO dateIO;
72
73
	public DGSParser(FileSourceDGS dgs, Reader reader) {
74
		this.dgs = dgs;
75
		this.reader = reader;
76
		bufferCapacity = 0;
77
		buffer = new char[BUFFER_SIZE];
78
		pushback = new int[10];
79
		pushbackOffset = -1;
80
		this.sourceId = String.format("<DGS stream %x>", System.nanoTime());
81
82
		// try {
83
		// dateIO = new ISODateIO();
84
		// } catch (Exception e) {
85
		// e.printStackTrace();
86
		// }
87
	}
88
89
	/*
90
	 * (non-Javadoc)
91
	 * 
92
	 * @see org.graphstream.util.parser.Parser#close()
93
	 */
94
	public void close() throws IOException {
95 1 1. close : removed call to java/io/Reader::close → NO_COVERAGE
		reader.close();
96
	}
97
98
	/*
99
	 * (non-Javadoc)
100
	 * 
101
	 * @see org.graphstream.util.parser.Parser#open()
102
	 */
103
	public void open() throws IOException, ParseException {
104 1 1. open : removed call to org/graphstream/stream/file/dgs/DGSParser::header → NO_COVERAGE
		header();
105
	}
106
107
	/*
108
	 * (non-Javadoc)
109
	 * 
110
	 * @see org.graphstream.util.parser.Parser#all()
111
	 */
112
	public void all() throws IOException, ParseException {
113 1 1. all : removed call to org/graphstream/stream/file/dgs/DGSParser::header → NO_COVERAGE
		header();
114
115 1 1. all : negated conditional → NO_COVERAGE
		while (next())
116
			;
117
	}
118
119
	protected int nextChar() throws IOException {
120
		int c;
121
122 2 1. nextChar : changed conditional boundary → NO_COVERAGE
2. nextChar : negated conditional → NO_COVERAGE
		if (pushbackOffset >= 0)
123 2 1. nextChar : Replaced integer subtraction with addition → NO_COVERAGE
2. nextChar : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
			return pushback[pushbackOffset--];
124
125 3 1. nextChar : changed conditional boundary → NO_COVERAGE
2. nextChar : negated conditional → NO_COVERAGE
3. nextChar : negated conditional → NO_COVERAGE
		if (bufferCapacity == 0 || bufferPosition >= bufferCapacity) {
126
			bufferCapacity = reader.read(buffer, 0, BUFFER_SIZE);
127
			bufferPosition = 0;
128
		}
129
130 2 1. nextChar : changed conditional boundary → NO_COVERAGE
2. nextChar : negated conditional → NO_COVERAGE
		if (bufferCapacity <= 0)
131 1 1. nextChar : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
			return -1;
132
133 1 1. nextChar : Replaced integer addition with subtraction → NO_COVERAGE
		c = buffer[bufferPosition++];
134
135
		//
136
		// Handle special EOL
137
		// - LF
138
		// - CR
139
		// - CR+LF
140
		//
141 1 1. nextChar : negated conditional → NO_COVERAGE
		if (c == '\r') {
142 2 1. nextChar : changed conditional boundary → NO_COVERAGE
2. nextChar : negated conditional → NO_COVERAGE
			if (bufferPosition < bufferCapacity) {
143 1 1. nextChar : negated conditional → NO_COVERAGE
				if (buffer[bufferPosition] == '\n')
144 1 1. nextChar : Replaced integer addition with subtraction → NO_COVERAGE
					bufferPosition++;
145
			} else {
146
				c = nextChar();
147
148 1 1. nextChar : negated conditional → NO_COVERAGE
				if (c != '\n')
149 1 1. nextChar : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
					pushback(c);
150
			}
151
152
			c = '\n';
153
		}
154
155 1 1. nextChar : negated conditional → NO_COVERAGE
		if (c == '\n') {
156 1 1. nextChar : Replaced integer addition with subtraction → NO_COVERAGE
			line++;
157
			column = 0;
158
		} else
159 1 1. nextChar : Replaced integer addition with subtraction → NO_COVERAGE
			column++;
160
161 1 1. nextChar : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return c;
162
	}
163
164
	protected void pushback(int c) throws IOException {
165 2 1. pushback : changed conditional boundary → NO_COVERAGE
2. pushback : negated conditional → NO_COVERAGE
		if (c < 0)
166
			return;
167
168 3 1. pushback : changed conditional boundary → NO_COVERAGE
2. pushback : Replaced integer addition with subtraction → NO_COVERAGE
3. pushback : negated conditional → NO_COVERAGE
		if (pushbackOffset + 1 >= pushback.length)
169
			throw new IOException("pushback buffer overflow");
170
171 1 1. pushback : Replaced integer addition with subtraction → NO_COVERAGE
		pushback[++pushbackOffset] = c;
172
	}
173
174
	protected void skipLine() throws IOException {
175
		int c;
176
177 3 1. skipLine : changed conditional boundary → NO_COVERAGE
2. skipLine : negated conditional → NO_COVERAGE
3. skipLine : negated conditional → NO_COVERAGE
		while ((c = nextChar()) != '\n' && c >= 0)
178
			;
179
	}
180
181
	protected void skipWhitespaces() throws IOException {
182
		int c;
183
184 2 1. skipWhitespaces : negated conditional → NO_COVERAGE
2. skipWhitespaces : negated conditional → NO_COVERAGE
		while ((c = nextChar()) == ' ' || c == '\t')
185
			;
186
187 1 1. skipWhitespaces : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
		pushback(c);
188
	}
189
190
	protected void header() throws IOException, ParseException {
191
		int[] dgs = new int[6];
192
193 3 1. header : changed conditional boundary → NO_COVERAGE
2. header : Changed increment from 1 to -1 → NO_COVERAGE
3. header : negated conditional → NO_COVERAGE
		for (int i = 0; i < 6; i++)
194
			dgs[i] = nextChar();
195
196 3 1. header : negated conditional → NO_COVERAGE
2. header : negated conditional → NO_COVERAGE
3. header : negated conditional → NO_COVERAGE
		if (dgs[0] != 'D' || dgs[1] != 'G' || dgs[2] != 'S')
197
			throw parseException(String.format(
198
					"bad magic header, 'DGS' expected, got '%c%c%c'", dgs[0],
199
					dgs[1], dgs[2]));
200
201 6 1. header : changed conditional boundary → NO_COVERAGE
2. header : changed conditional boundary → NO_COVERAGE
3. header : negated conditional → NO_COVERAGE
4. header : negated conditional → NO_COVERAGE
5. header : negated conditional → NO_COVERAGE
6. header : negated conditional → NO_COVERAGE
		if (dgs[3] != '0' || dgs[4] != '0' || dgs[5] < '0' || dgs[5] > '5')
202
			throw parseException(String.format("bad version \"%c%c%c\"",
203
					dgs[0], dgs[1], dgs[2]));
204
205 1 1. header : negated conditional → NO_COVERAGE
		if (nextChar() != '\n')
206
			throw parseException("end-of-line is missing");
207
208 1 1. header : removed call to org/graphstream/stream/file/dgs/DGSParser::skipLine → NO_COVERAGE
		skipLine();
209
	}
210
211
	/*
212
	 * (non-Javadoc)
213
	 * 
214
	 * @see org.graphstream.util.parser.Parser#next()
215
	 */
216
	public boolean next() throws IOException, ParseException {
217
		int c;
218
		String nodeId;
219
		String edgeId, source, target;
220
221
		lastDirective = directive();
222
223
		switch (lastDirective) {
224
		case AN:
225
			nodeId = id();
226 1 1. next : removed call to org/graphstream/stream/file/FileSourceDGS::sendNodeAdded → NO_COVERAGE
			dgs.sendNodeAdded(sourceId, nodeId);
227
228 1 1. next : removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE
			attributes(ElementType.NODE, nodeId);
229
			break;
230
		case CN:
231
			nodeId = id();
232 1 1. next : removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE
			attributes(ElementType.NODE, nodeId);
233
			break;
234
		case DN:
235
			nodeId = id();
236 1 1. next : removed call to org/graphstream/stream/file/FileSourceDGS::sendNodeRemoved → NO_COVERAGE
			dgs.sendNodeRemoved(sourceId, nodeId);
237
			break;
238
		case AE:
239
			edgeId = id();
240
			source = id();
241
242 1 1. next : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
			skipWhitespaces();
243
			c = nextChar();
244
245 2 1. next : negated conditional → NO_COVERAGE
2. next : negated conditional → NO_COVERAGE
			if (c != '<' && c != '>')
246 1 1. next : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
				pushback(c);
247
248
			target = id();
249
250
			switch (c) {
251
			case '>':
252 1 1. next : removed call to org/graphstream/stream/file/FileSourceDGS::sendEdgeAdded → NO_COVERAGE
				dgs.sendEdgeAdded(sourceId, edgeId, source, target, true);
253
				break;
254
			case '<':
255 1 1. next : removed call to org/graphstream/stream/file/FileSourceDGS::sendEdgeAdded → NO_COVERAGE
				dgs.sendEdgeAdded(sourceId, edgeId, target, source, true);
256
				break;
257
			default:
258 1 1. next : removed call to org/graphstream/stream/file/FileSourceDGS::sendEdgeAdded → NO_COVERAGE
				dgs.sendEdgeAdded(sourceId, edgeId, source, target, false);
259
				break;
260
			}
261
262 1 1. next : removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE
			attributes(ElementType.EDGE, edgeId);
263
			break;
264
		case CE:
265
			edgeId = id();
266 1 1. next : removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE
			attributes(ElementType.EDGE, edgeId);
267
			break;
268
		case DE:
269
			edgeId = id();
270 1 1. next : removed call to org/graphstream/stream/file/FileSourceDGS::sendEdgeRemoved → NO_COVERAGE
			dgs.sendEdgeRemoved(sourceId, edgeId);
271
			break;
272
		case CG:
273 1 1. next : removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE
			attributes(ElementType.GRAPH, null);
274
			break;
275
		case ST:
276
			// TODO release 1.2 : read timestamp
277
			// Version for 1.2 :
278
			// --------------------------------
279
			// long step;
280
			// step = timestamp();
281
			// sendStepBegins(sourceId, ste);
282
283
			double step;
284
285
			step = Double.valueOf(id());
286 1 1. next : removed call to org/graphstream/stream/file/FileSourceDGS::sendStepBegins → NO_COVERAGE
			dgs.sendStepBegins(sourceId, step);
287
			break;
288
		case CL:
289 1 1. next : removed call to org/graphstream/stream/file/FileSourceDGS::sendGraphCleared → NO_COVERAGE
			dgs.sendGraphCleared(sourceId);
290
			break;
291
		case TF:
292
			// TODO for release 1.2
293
			// String tf;
294
			// tf = string();
295
296
			// try {
297
			// dateIO.setFormat(tf);
298
			// } catch (Exception e) {
299
			// throw parseException("invalid time format \"%s\"", tf);
300
			// }
301
302
			break;
303
		case EOF:
304 1 1. next : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
			return false;
305
		}
306
307 1 1. next : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
		skipWhitespaces();
308
		c = nextChar();
309
310 1 1. next : negated conditional → NO_COVERAGE
		if (c == '#') {
311 1 1. next : removed call to org/graphstream/stream/file/dgs/DGSParser::skipLine → NO_COVERAGE
			skipLine();
312 1 1. next : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
			return true;
313
		}
314
315 2 1. next : changed conditional boundary → NO_COVERAGE
2. next : negated conditional → NO_COVERAGE
		if (c < 0)
316 1 1. next : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
			return false;
317
318 1 1. next : negated conditional → NO_COVERAGE
		if (c != '\n')
319
			throw parseException("eol expected, got '%c'", c);
320
321 1 1. next : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return true;
322
	}
323
324
	public boolean nextStep() throws IOException, ParseException {
325
		boolean r;
326
		Token next;
327
328
		do {
329
			r = next();
330
			next = directive();
331
332 1 1. nextStep : negated conditional → NO_COVERAGE
			if (next != Token.EOF) {
333 1 1. nextStep : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
				pushback(next.name().charAt(1));
334 1 1. nextStep : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
				pushback(next.name().charAt(0));
335
			}
336 2 1. nextStep : negated conditional → NO_COVERAGE
2. nextStep : negated conditional → NO_COVERAGE
		} while (next != Token.ST && next != Token.EOF);
337
338 1 1. nextStep : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return r;
339
	}
340
341
	protected void attributes(ElementType type, String id) throws IOException,
342
			ParseException {
343
		int c;
344
		
345 1 1. attributes : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
		skipWhitespaces();
346
347 4 1. attributes : changed conditional boundary → NO_COVERAGE
2. attributes : negated conditional → NO_COVERAGE
3. attributes : negated conditional → NO_COVERAGE
4. attributes : negated conditional → NO_COVERAGE
		while ((c = nextChar()) != '\n' && c != '#' && c >= 0) {
348 1 1. attributes : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
			pushback(c);
349 1 1. attributes : removed call to org/graphstream/stream/file/dgs/DGSParser::attribute → NO_COVERAGE
			attribute(type, id);
350 1 1. attributes : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
			skipWhitespaces();
351
		}
352
353 1 1. attributes : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
		pushback(c);
354
	}
355
356
	protected void attribute(ElementType type, String elementId)
357
			throws IOException, ParseException {
358
		String key;
359
		Object value = null;
360
		int c;
361
		AttributeChangeEvent ch = AttributeChangeEvent.CHANGE;
362
363 1 1. attribute : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
		skipWhitespaces();
364
		c = nextChar();
365
366 1 1. attribute : negated conditional → NO_COVERAGE
		if (c == '+')
367
			ch = AttributeChangeEvent.ADD;
368 1 1. attribute : negated conditional → NO_COVERAGE
		else if (c == '-')
369
			ch = AttributeChangeEvent.REMOVE;
370
		else
371 1 1. attribute : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
			pushback(c);
372
373
		key = id();
374
375 1 1. attribute : negated conditional → NO_COVERAGE
		if (key == null)
376
			throw parseException("attribute key expected");
377
378 1 1. attribute : negated conditional → NO_COVERAGE
		if (ch != AttributeChangeEvent.REMOVE) {
379
380 1 1. attribute : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
			skipWhitespaces();
381
			c = nextChar();
382
383 2 1. attribute : negated conditional → NO_COVERAGE
2. attribute : negated conditional → NO_COVERAGE
			if (c == '=' || c == ':') {
384 1 1. attribute : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
				skipWhitespaces();
385
				value = value(true);
386
			} else {
387
				value = Boolean.TRUE;
388 1 1. attribute : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
				pushback(c);
389
			}
390
		}
391
392 1 1. attribute : removed call to org/graphstream/stream/file/FileSourceDGS::sendAttributeChangedEvent → NO_COVERAGE
		dgs.sendAttributeChangedEvent(sourceId, elementId, type, key, ch, null,
393
				value);
394
	}
395
396
	protected Object value(boolean array) throws IOException, ParseException {
397
		int c;
398
		LinkedList<Object> l = null;
399
		Object o;
400
401
		do {
402 1 1. value : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
			skipWhitespaces();
403
			c = nextChar();
404 1 1. value : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
			pushback(c);
405
406
			switch (c) {
407
			case '\'':
408
			case '\"':
409
				o = string();
410
				break;
411
			case '#':
412
				o = color();
413
				break;
414
			case ARRAY_OPEN:
415
				//
416
				// Skip ARRAY_OPEN
417
				nextChar();
418
				//
419
420 1 1. value : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
				skipWhitespaces();
421
				o = value(true);
422 1 1. value : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
				skipWhitespaces();
423
424
				//
425
				// Check if next char is ARRAY_CLOSE
426 1 1. value : negated conditional → NO_COVERAGE
				if (nextChar() != ARRAY_CLOSE)
427
					throw parseException("'%c' expected", ARRAY_CLOSE);
428
				//
429
430 1 1. value : negated conditional → NO_COVERAGE
				if (!o.getClass().isArray())
431
					o = new Object[] { o };
432
433
				break;
434
			case MAP_OPEN:
435
				o = map();
436
				break;
437
			default: {
438
				String word = id();
439
440 1 1. value : negated conditional → NO_COVERAGE
				if (word == null)
441
					throw parseException("missing value");
442
443 5 1. value : changed conditional boundary → NO_COVERAGE
2. value : changed conditional boundary → NO_COVERAGE
3. value : negated conditional → NO_COVERAGE
4. value : negated conditional → NO_COVERAGE
5. value : negated conditional → NO_COVERAGE
				if ((c >= '0' && c <= '9') || c == '-') {
444
					try {
445 2 1. value : changed conditional boundary → NO_COVERAGE
2. value : negated conditional → NO_COVERAGE
						if (word.indexOf('.') > 0)
446
							o = Double.valueOf(word);
447
						else
448
							o = Integer.valueOf(word);
449
					} catch (NumberFormatException e) {
450
						throw parseException("invalid number format '%s'", word);
451
					}
452
				} else {
453 1 1. value : negated conditional → NO_COVERAGE
					if (word.equalsIgnoreCase("true"))
454
						o = Boolean.TRUE;
455 1 1. value : negated conditional → NO_COVERAGE
					else if (word.equalsIgnoreCase("false"))
456
						o = Boolean.FALSE;
457
					else
458
						o = word;
459
				}
460
461
				break;
462
			}
463
			}
464
465
			c = nextChar();
466
467 3 1. value : negated conditional → NO_COVERAGE
2. value : negated conditional → NO_COVERAGE
3. value : negated conditional → NO_COVERAGE
			if (l == null && array && c == ',') {
468
				l = new LinkedList<Object>();
469
				l.add(o);
470 1 1. value : negated conditional → NO_COVERAGE
			} else if (l != null)
471
				l.add(o);
472 2 1. value : negated conditional → NO_COVERAGE
2. value : negated conditional → NO_COVERAGE
		} while (array && c == ',');
473
474 1 1. value : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
		pushback(c);
475
476 1 1. value : negated conditional → NO_COVERAGE
		if (l == null)
477 1 1. value : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::value to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return o;
478
479 1 1. value : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::value to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return l.toArray();
480
	}
481
482
	protected Color color() throws IOException, ParseException {
483
		int c;
484
		int r, g, b, a;
485
		StringBuilder hexa = new StringBuilder();
486
487
		c = nextChar();
488
489 1 1. color : negated conditional → NO_COVERAGE
		if (c != '#')
490
			throw parseException("'#' expected");
491
492 3 1. color : changed conditional boundary → NO_COVERAGE
2. color : Changed increment from 1 to -1 → NO_COVERAGE
3. color : negated conditional → NO_COVERAGE
		for (int i = 0; i < 6; i++) {
493
			c = nextChar();
494
495 8 1. color : changed conditional boundary → NO_COVERAGE
2. color : changed conditional boundary → NO_COVERAGE
3. color : changed conditional boundary → NO_COVERAGE
4. color : changed conditional boundary → NO_COVERAGE
5. color : negated conditional → NO_COVERAGE
6. color : negated conditional → NO_COVERAGE
7. color : negated conditional → NO_COVERAGE
8. color : negated conditional → NO_COVERAGE
			if ((c >= 0 && c <= '9') || (c >= 'a' && c <= 'f')
496 4 1. color : changed conditional boundary → NO_COVERAGE
2. color : changed conditional boundary → NO_COVERAGE
3. color : negated conditional → NO_COVERAGE
4. color : negated conditional → NO_COVERAGE
					|| (c >= 'A' && c <= 'F'))
497
				hexa.appendCodePoint(c);
498
			else
499
				throw parseException("hexadecimal value expected");
500
		}
501
502
		r = Integer.parseInt(hexa.substring(0, 2), 16);
503
		g = Integer.parseInt(hexa.substring(2, 4), 16);
504
		b = Integer.parseInt(hexa.substring(4, 6), 16);
505
506
		c = nextChar();
507
508 8 1. color : changed conditional boundary → NO_COVERAGE
2. color : changed conditional boundary → NO_COVERAGE
3. color : changed conditional boundary → NO_COVERAGE
4. color : changed conditional boundary → NO_COVERAGE
5. color : negated conditional → NO_COVERAGE
6. color : negated conditional → NO_COVERAGE
7. color : negated conditional → NO_COVERAGE
8. color : negated conditional → NO_COVERAGE
		if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f')
509 4 1. color : changed conditional boundary → NO_COVERAGE
2. color : changed conditional boundary → NO_COVERAGE
3. color : negated conditional → NO_COVERAGE
4. color : negated conditional → NO_COVERAGE
				|| (c >= 'A' && c <= 'F')) {
510
			hexa.appendCodePoint(c);
511
512
			c = nextChar();
513
514 8 1. color : changed conditional boundary → NO_COVERAGE
2. color : changed conditional boundary → NO_COVERAGE
3. color : changed conditional boundary → NO_COVERAGE
4. color : changed conditional boundary → NO_COVERAGE
5. color : negated conditional → NO_COVERAGE
6. color : negated conditional → NO_COVERAGE
7. color : negated conditional → NO_COVERAGE
8. color : negated conditional → NO_COVERAGE
			if ((c >= 0 && c <= '9') || (c >= 'a' && c <= 'f')
515 4 1. color : changed conditional boundary → NO_COVERAGE
2. color : changed conditional boundary → NO_COVERAGE
3. color : negated conditional → NO_COVERAGE
4. color : negated conditional → NO_COVERAGE
					|| (c >= 'A' && c <= 'F'))
516
				hexa.appendCodePoint(c);
517
			else
518
				throw parseException("hexadecimal value expected");
519
520
			a = Integer.parseInt(hexa.substring(6, 8), 16);
521
		} else {
522
			a = 255;
523 1 1. color : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
			pushback(c);
524
		}
525
526 1 1. color : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::color to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return new Color(r, g, b, a);
527
	}
528
529
	protected Object array() throws IOException, ParseException {
530
		int c;
531
		LinkedList<Object> array = new LinkedList<Object>();
532
533
		c = nextChar();
534
535 1 1. array : negated conditional → NO_COVERAGE
		if (c != ARRAY_OPEN)
536
			throw parseException("'%c' expected", ARRAY_OPEN);
537
538 1 1. array : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
		skipWhitespaces();
539
		c = nextChar();
540
541 1 1. array : negated conditional → NO_COVERAGE
		while (c != ARRAY_CLOSE) {
542 1 1. array : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
			pushback(c);
543
			array.add(value(false));
544
545 1 1. array : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
			skipWhitespaces();
546
			c = nextChar();
547
548 2 1. array : negated conditional → NO_COVERAGE
2. array : negated conditional → NO_COVERAGE
			if (c != ARRAY_CLOSE && c != ',')
549
				throw parseException("'%c' or ',' expected, got '%c'",
550
						ARRAY_CLOSE, c);
551
552 1 1. array : negated conditional → NO_COVERAGE
			if (c == ',') {
553 1 1. array : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
				skipWhitespaces();
554
				c = nextChar();
555
			}
556
		}
557
558 1 1. array : negated conditional → NO_COVERAGE
		if (c != ARRAY_CLOSE)
559
			throw parseException("'%c' expected", ARRAY_CLOSE);
560
561 1 1. array : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::array to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return array.toArray();
562
	}
563
564
	protected Object map() throws IOException, ParseException {
565
		int c;
566
		HashMap<String, Object> map = new HashMap<String, Object>();
567
		String key;
568
		Object value;
569
570
		c = nextChar();
571
572 1 1. map : negated conditional → NO_COVERAGE
		if (c != MAP_OPEN)
573
			throw parseException("'%c' expected", MAP_OPEN);
574
575
		c = nextChar();
576
577 1 1. map : negated conditional → NO_COVERAGE
		while (c != MAP_CLOSE) {
578 1 1. map : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
			pushback(c);
579
			key = id();
580
581 1 1. map : negated conditional → NO_COVERAGE
			if (key == null)
582
				throw parseException("id expected here, '%c'", c);
583
584 1 1. map : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
			skipWhitespaces();
585
			c = nextChar();
586
587 2 1. map : negated conditional → NO_COVERAGE
2. map : negated conditional → NO_COVERAGE
			if (c == '=' || c == ':') {
588 1 1. map : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
				skipWhitespaces();
589
				value = value(false);
590
			} else {
591
				value = Boolean.TRUE;
592 1 1. map : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
				pushback(c);
593
			}
594
595
			map.put(key, value);
596
597 1 1. map : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
			skipWhitespaces();
598
			c = nextChar();
599
600 2 1. map : negated conditional → NO_COVERAGE
2. map : negated conditional → NO_COVERAGE
			if (c != MAP_CLOSE && c != ',')
601
				throw parseException("'%c' or ',' expected, got '%c'",
602
						MAP_CLOSE, c);
603
604 1 1. map : negated conditional → NO_COVERAGE
			if (c == ',') {
605 1 1. map : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
				skipWhitespaces();
606
				c = nextChar();
607
			}
608
		}
609
610 1 1. map : negated conditional → NO_COVERAGE
		if (c != MAP_CLOSE)
611
			throw parseException("'%c' expected", MAP_CLOSE);
612
613 1 1. map : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::map to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return map;
614
	}
615
616
	protected Token directive() throws IOException, ParseException {
617
		int c1, c2;
618
619
		//
620
		// Skip comment and empty lines
621
		//
622
		do {
623
			c1 = nextChar();
624
625 1 1. directive : negated conditional → NO_COVERAGE
			if (c1 == '#')
626 1 1. directive : removed call to org/graphstream/stream/file/dgs/DGSParser::skipLine → NO_COVERAGE
				skipLine();
627
628 2 1. directive : changed conditional boundary → NO_COVERAGE
2. directive : negated conditional → NO_COVERAGE
			if (c1 < 0)
629 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.EOF;
630 2 1. directive : negated conditional → NO_COVERAGE
2. directive : negated conditional → NO_COVERAGE
		} while (c1 == '#' || c1 == '\n');
631
632
		c2 = nextChar();
633
634 4 1. directive : changed conditional boundary → NO_COVERAGE
2. directive : changed conditional boundary → NO_COVERAGE
3. directive : negated conditional → NO_COVERAGE
4. directive : negated conditional → NO_COVERAGE
		if (c1 >= 'A' && c1 <= 'Z')
635 1 1. directive : Changed increment from 32 to -32 → NO_COVERAGE
			c1 -= 'A' - 'a';
636
637 4 1. directive : changed conditional boundary → NO_COVERAGE
2. directive : changed conditional boundary → NO_COVERAGE
3. directive : negated conditional → NO_COVERAGE
4. directive : negated conditional → NO_COVERAGE
		if (c2 >= 'A' && c2 <= 'Z')
638 1 1. directive : Changed increment from 32 to -32 → NO_COVERAGE
			c2 -= 'A' - 'a';
639
640
		switch (c1) {
641
		case 'a':
642 1 1. directive : negated conditional → NO_COVERAGE
			if (c2 == 'n')
643 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.AN;
644 1 1. directive : negated conditional → NO_COVERAGE
			else if (c2 == 'e')
645 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.AE;
646
647
			break;
648
		case 'c':
649
			switch (c2) {
650
			case 'n':
651 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.CN;
652
			case 'e':
653 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.CE;
654
			case 'g':
655 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.CG;
656
			case 'l':
657 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.CL;
658
			}
659
660
			break;
661
		case 'd':
662 1 1. directive : negated conditional → NO_COVERAGE
			if (c2 == 'n')
663 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.DN;
664 1 1. directive : negated conditional → NO_COVERAGE
			else if (c2 == 'e')
665 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.DE;
666
667
			break;
668
		case 's':
669 1 1. directive : negated conditional → NO_COVERAGE
			if (c2 == 't')
670 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.ST;
671
672
			break;
673
		case 't':
674 1 1. directive : negated conditional → NO_COVERAGE
			if (c1 == 'f')
675 1 1. directive : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return Token.TF;
676
677
			break;
678
		}
679
680
		throw parseException("unknown directive '%c%c'", c1, c2);
681
	}
682
683
	protected String string() throws IOException, ParseException {
684
		int c, s;
685
		StringBuilder builder;
686
		boolean slash;
687
688
		slash = false;
689
		builder = new StringBuilder();
690
		c = nextChar();
691
692 2 1. string : negated conditional → NO_COVERAGE
2. string : negated conditional → NO_COVERAGE
		if (c != '\"' && c != '\'')
693
			throw parseException("string expected");
694
695
		s = c;
696
697 2 1. string : negated conditional → NO_COVERAGE
2. string : negated conditional → NO_COVERAGE
		while ((c = nextChar()) != s || slash) {
698 2 1. string : negated conditional → NO_COVERAGE
2. string : negated conditional → NO_COVERAGE
			if (slash && c != s)
699
				builder.append("\\");
700
701 1 1. string : negated conditional → NO_COVERAGE
			slash = c == '\\';
702
703 1 1. string : negated conditional → NO_COVERAGE
			if (!slash) {
704 1 1. string : negated conditional → NO_COVERAGE
				if (!Character.isValidCodePoint(c))
705
					throw parseException("invalid code-point 0x%X", c);
706
707
				builder.appendCodePoint(c);
708
			}
709
		}
710
711 1 1. string : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::string to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return builder.toString();
712
	}
713
714
	protected String id() throws IOException, ParseException {
715
		int c;
716
		StringBuilder builder = new StringBuilder();
717
718 1 1. id : removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE
		skipWhitespaces();
719
		c = nextChar();
720 1 1. id : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
		pushback(c);
721
722 2 1. id : negated conditional → NO_COVERAGE
2. id : negated conditional → NO_COVERAGE
		if (c == '\"' || c == '\'') {
723 1 1. id : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::id to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return string();
724
		} else {
725
			boolean stop = false;
726
727 1 1. id : negated conditional → NO_COVERAGE
			while (!stop) {
728
				c = nextChar();
729
730
				switch (Character.getType(c)) {
731
				case Character.LOWERCASE_LETTER:
732
				case Character.UPPERCASE_LETTER:
733
				case Character.DECIMAL_DIGIT_NUMBER:
734
					break;
735
				case Character.DASH_PUNCTUATION:
736 1 1. id : negated conditional → NO_COVERAGE
					if (c != '-')
737
						stop = true;
738
739
					break;
740
				case Character.CONNECTOR_PUNCTUATION:
741 1 1. id : negated conditional → NO_COVERAGE
					if (c != '_')
742
						stop = true;
743
744
					break;
745
				case Character.OTHER_PUNCTUATION:
746 1 1. id : negated conditional → NO_COVERAGE
					if (c != '.')
747
						stop = true;
748
749
					break;
750
				default:
751
					stop = true;
752
					break;
753
				}
754
755 1 1. id : negated conditional → NO_COVERAGE
				if (!stop)
756
					builder.appendCodePoint(c);
757
			}
758
759 1 1. id : removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE
			pushback(c);
760
		}
761
762 1 1. id : negated conditional → NO_COVERAGE
		if (builder.length() == 0)
763 1 1. id : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::id to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return null;
764
765 1 1. id : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::id to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return builder.toString();
766
	}
767
768
	/*
769
	 * protected long timestamp() throws IOException, ParseException { int c;
770
	 * String time;
771
	 * 
772
	 * c = nextChar(); pushback(c);
773
	 * 
774
	 * switch (c) { case '"': case '\'': time = string(); break; default:
775
	 * StringBuilder builder = new StringBuilder();
776
	 * 
777
	 * while ((c = nextChar()) != '\n' && c != '"') builder.appendCodePoint(c);
778
	 * 
779
	 * pushback(c); time = builder.toString(); break; }
780
	 * 
781
	 * pushback(c); return dateIO.parse(time).getTimeInMillis(); }
782
	 */
783
784
	protected ParseException parseException(String message, Object... args) {
785 1 1. parseException : mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::parseException to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return new ParseException(String.format(String.format(
786
				"parse error at (%d;%d) : %s", line, column, message), args));
787
	}
788
}

Mutations

95

1.1
Location : close
Killed by : none
removed call to java/io/Reader::close → NO_COVERAGE

104

1.1
Location : open
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::header → NO_COVERAGE

113

1.1
Location : all
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::header → NO_COVERAGE

115

1.1
Location : all
Killed by : none
negated conditional → NO_COVERAGE

122

1.1
Location : nextChar
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : nextChar
Killed by : none
negated conditional → NO_COVERAGE

123

1.1
Location : nextChar
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

2.2
Location : nextChar
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

125

1.1
Location : nextChar
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : nextChar
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : nextChar
Killed by : none
negated conditional → NO_COVERAGE

130

1.1
Location : nextChar
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : nextChar
Killed by : none
negated conditional → NO_COVERAGE

131

1.1
Location : nextChar
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

133

1.1
Location : nextChar
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

141

1.1
Location : nextChar
Killed by : none
negated conditional → NO_COVERAGE

142

1.1
Location : nextChar
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : nextChar
Killed by : none
negated conditional → NO_COVERAGE

143

1.1
Location : nextChar
Killed by : none
negated conditional → NO_COVERAGE

144

1.1
Location : nextChar
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

148

1.1
Location : nextChar
Killed by : none
negated conditional → NO_COVERAGE

149

1.1
Location : nextChar
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

155

1.1
Location : nextChar
Killed by : none
negated conditional → NO_COVERAGE

156

1.1
Location : nextChar
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

159

1.1
Location : nextChar
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

161

1.1
Location : nextChar
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

165

1.1
Location : pushback
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : pushback
Killed by : none
negated conditional → NO_COVERAGE

168

1.1
Location : pushback
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : pushback
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

3.3
Location : pushback
Killed by : none
negated conditional → NO_COVERAGE

171

1.1
Location : pushback
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

177

1.1
Location : skipLine
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : skipLine
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : skipLine
Killed by : none
negated conditional → NO_COVERAGE

184

1.1
Location : skipWhitespaces
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : skipWhitespaces
Killed by : none
negated conditional → NO_COVERAGE

187

1.1
Location : skipWhitespaces
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

193

1.1
Location : header
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : header
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

3.3
Location : header
Killed by : none
negated conditional → NO_COVERAGE

196

1.1
Location : header
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : header
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : header
Killed by : none
negated conditional → NO_COVERAGE

201

1.1
Location : header
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : header
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : header
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : header
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : header
Killed by : none
negated conditional → NO_COVERAGE

6.6
Location : header
Killed by : none
negated conditional → NO_COVERAGE

205

1.1
Location : header
Killed by : none
negated conditional → NO_COVERAGE

208

1.1
Location : header
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipLine → NO_COVERAGE

226

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/FileSourceDGS::sendNodeAdded → NO_COVERAGE

228

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE

232

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE

236

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/FileSourceDGS::sendNodeRemoved → NO_COVERAGE

242

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

245

1.1
Location : next
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : next
Killed by : none
negated conditional → NO_COVERAGE

246

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

252

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/FileSourceDGS::sendEdgeAdded → NO_COVERAGE

255

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/FileSourceDGS::sendEdgeAdded → NO_COVERAGE

258

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/FileSourceDGS::sendEdgeAdded → NO_COVERAGE

262

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE

266

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE

270

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/FileSourceDGS::sendEdgeRemoved → NO_COVERAGE

273

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::attributes → NO_COVERAGE

286

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/FileSourceDGS::sendStepBegins → NO_COVERAGE

289

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/FileSourceDGS::sendGraphCleared → NO_COVERAGE

304

1.1
Location : next
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

307

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

310

1.1
Location : next
Killed by : none
negated conditional → NO_COVERAGE

311

1.1
Location : next
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipLine → NO_COVERAGE

312

1.1
Location : next
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

315

1.1
Location : next
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : next
Killed by : none
negated conditional → NO_COVERAGE

316

1.1
Location : next
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

318

1.1
Location : next
Killed by : none
negated conditional → NO_COVERAGE

321

1.1
Location : next
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

332

1.1
Location : nextStep
Killed by : none
negated conditional → NO_COVERAGE

333

1.1
Location : nextStep
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

334

1.1
Location : nextStep
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

336

1.1
Location : nextStep
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : nextStep
Killed by : none
negated conditional → NO_COVERAGE

338

1.1
Location : nextStep
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

345

1.1
Location : attributes
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

347

1.1
Location : attributes
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : attributes
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : attributes
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : attributes
Killed by : none
negated conditional → NO_COVERAGE

348

1.1
Location : attributes
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

349

1.1
Location : attributes
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::attribute → NO_COVERAGE

350

1.1
Location : attributes
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

353

1.1
Location : attributes
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

363

1.1
Location : attribute
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

366

1.1
Location : attribute
Killed by : none
negated conditional → NO_COVERAGE

368

1.1
Location : attribute
Killed by : none
negated conditional → NO_COVERAGE

371

1.1
Location : attribute
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

375

1.1
Location : attribute
Killed by : none
negated conditional → NO_COVERAGE

378

1.1
Location : attribute
Killed by : none
negated conditional → NO_COVERAGE

380

1.1
Location : attribute
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

383

1.1
Location : attribute
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : attribute
Killed by : none
negated conditional → NO_COVERAGE

384

1.1
Location : attribute
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

388

1.1
Location : attribute
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

392

1.1
Location : attribute
Killed by : none
removed call to org/graphstream/stream/file/FileSourceDGS::sendAttributeChangedEvent → NO_COVERAGE

402

1.1
Location : value
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

404

1.1
Location : value
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

420

1.1
Location : value
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

422

1.1
Location : value
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

426

1.1
Location : value
Killed by : none
negated conditional → NO_COVERAGE

430

1.1
Location : value
Killed by : none
negated conditional → NO_COVERAGE

440

1.1
Location : value
Killed by : none
negated conditional → NO_COVERAGE

443

1.1
Location : value
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : value
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : value
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : value
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : value
Killed by : none
negated conditional → NO_COVERAGE

445

1.1
Location : value
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : value
Killed by : none
negated conditional → NO_COVERAGE

453

1.1
Location : value
Killed by : none
negated conditional → NO_COVERAGE

455

1.1
Location : value
Killed by : none
negated conditional → NO_COVERAGE

467

1.1
Location : value
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : value
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : value
Killed by : none
negated conditional → NO_COVERAGE

470

1.1
Location : value
Killed by : none
negated conditional → NO_COVERAGE

472

1.1
Location : value
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : value
Killed by : none
negated conditional → NO_COVERAGE

474

1.1
Location : value
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

476

1.1
Location : value
Killed by : none
negated conditional → NO_COVERAGE

477

1.1
Location : value
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::value to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

479

1.1
Location : value
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::value to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

489

1.1
Location : color
Killed by : none
negated conditional → NO_COVERAGE

492

1.1
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : color
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

3.3
Location : color
Killed by : none
negated conditional → NO_COVERAGE

495

1.1
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

4.4
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

5.5
Location : color
Killed by : none
negated conditional → NO_COVERAGE

6.6
Location : color
Killed by : none
negated conditional → NO_COVERAGE

7.7
Location : color
Killed by : none
negated conditional → NO_COVERAGE

8.8
Location : color
Killed by : none
negated conditional → NO_COVERAGE

496

1.1
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : color
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : color
Killed by : none
negated conditional → NO_COVERAGE

508

1.1
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

4.4
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

5.5
Location : color
Killed by : none
negated conditional → NO_COVERAGE

6.6
Location : color
Killed by : none
negated conditional → NO_COVERAGE

7.7
Location : color
Killed by : none
negated conditional → NO_COVERAGE

8.8
Location : color
Killed by : none
negated conditional → NO_COVERAGE

509

1.1
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : color
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : color
Killed by : none
negated conditional → NO_COVERAGE

514

1.1
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

4.4
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

5.5
Location : color
Killed by : none
negated conditional → NO_COVERAGE

6.6
Location : color
Killed by : none
negated conditional → NO_COVERAGE

7.7
Location : color
Killed by : none
negated conditional → NO_COVERAGE

8.8
Location : color
Killed by : none
negated conditional → NO_COVERAGE

515

1.1
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : color
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : color
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : color
Killed by : none
negated conditional → NO_COVERAGE

523

1.1
Location : color
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

526

1.1
Location : color
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::color to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

535

1.1
Location : array
Killed by : none
negated conditional → NO_COVERAGE

538

1.1
Location : array
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

541

1.1
Location : array
Killed by : none
negated conditional → NO_COVERAGE

542

1.1
Location : array
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

545

1.1
Location : array
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

548

1.1
Location : array
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : array
Killed by : none
negated conditional → NO_COVERAGE

552

1.1
Location : array
Killed by : none
negated conditional → NO_COVERAGE

553

1.1
Location : array
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

558

1.1
Location : array
Killed by : none
negated conditional → NO_COVERAGE

561

1.1
Location : array
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::array to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

572

1.1
Location : map
Killed by : none
negated conditional → NO_COVERAGE

577

1.1
Location : map
Killed by : none
negated conditional → NO_COVERAGE

578

1.1
Location : map
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

581

1.1
Location : map
Killed by : none
negated conditional → NO_COVERAGE

584

1.1
Location : map
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

587

1.1
Location : map
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : map
Killed by : none
negated conditional → NO_COVERAGE

588

1.1
Location : map
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

592

1.1
Location : map
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

597

1.1
Location : map
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

600

1.1
Location : map
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : map
Killed by : none
negated conditional → NO_COVERAGE

604

1.1
Location : map
Killed by : none
negated conditional → NO_COVERAGE

605

1.1
Location : map
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

610

1.1
Location : map
Killed by : none
negated conditional → NO_COVERAGE

613

1.1
Location : map
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::map to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

625

1.1
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

626

1.1
Location : directive
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipLine → NO_COVERAGE

628

1.1
Location : directive
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

629

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

630

1.1
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

634

1.1
Location : directive
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : directive
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

635

1.1
Location : directive
Killed by : none
Changed increment from 32 to -32 → NO_COVERAGE

637

1.1
Location : directive
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : directive
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

638

1.1
Location : directive
Killed by : none
Changed increment from 32 to -32 → NO_COVERAGE

642

1.1
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

643

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

644

1.1
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

645

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

651

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

653

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

655

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

657

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

662

1.1
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

663

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

664

1.1
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

665

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

669

1.1
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

670

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

674

1.1
Location : directive
Killed by : none
negated conditional → NO_COVERAGE

675

1.1
Location : directive
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::directive to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

692

1.1
Location : string
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : string
Killed by : none
negated conditional → NO_COVERAGE

697

1.1
Location : string
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : string
Killed by : none
negated conditional → NO_COVERAGE

698

1.1
Location : string
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : string
Killed by : none
negated conditional → NO_COVERAGE

701

1.1
Location : string
Killed by : none
negated conditional → NO_COVERAGE

703

1.1
Location : string
Killed by : none
negated conditional → NO_COVERAGE

704

1.1
Location : string
Killed by : none
negated conditional → NO_COVERAGE

711

1.1
Location : string
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::string to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

718

1.1
Location : id
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::skipWhitespaces → NO_COVERAGE

720

1.1
Location : id
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

722

1.1
Location : id
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : id
Killed by : none
negated conditional → NO_COVERAGE

723

1.1
Location : id
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::id to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

727

1.1
Location : id
Killed by : none
negated conditional → NO_COVERAGE

736

1.1
Location : id
Killed by : none
negated conditional → NO_COVERAGE

741

1.1
Location : id
Killed by : none
negated conditional → NO_COVERAGE

746

1.1
Location : id
Killed by : none
negated conditional → NO_COVERAGE

755

1.1
Location : id
Killed by : none
negated conditional → NO_COVERAGE

759

1.1
Location : id
Killed by : none
removed call to org/graphstream/stream/file/dgs/DGSParser::pushback → NO_COVERAGE

762

1.1
Location : id
Killed by : none
negated conditional → NO_COVERAGE

763

1.1
Location : id
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::id to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

765

1.1
Location : id
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::id to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

785

1.1
Location : parseException
Killed by : none
mutated return of Object value for org/graphstream/stream/file/dgs/DGSParser::parseException to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 0.33