FileSinkGEXF.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;
33
34
import org.graphstream.graph.Edge;
35
import org.graphstream.graph.Element;
36
import org.graphstream.graph.Graph;
37
import org.graphstream.graph.Node;
38
import org.graphstream.graph.implementations.AdjacencyListGraph;
39
40
import java.io.IOException;
41
import java.net.URI;
42
import java.net.URL;
43
import java.text.DateFormat;
44
import java.util.Calendar;
45
import java.util.Collection;
46
import java.util.Date;
47
import java.util.HashMap;
48
49
import javax.xml.stream.FactoryConfigurationError;
50
import javax.xml.stream.XMLOutputFactory;
51
import javax.xml.stream.XMLStreamException;
52
import javax.xml.stream.XMLStreamWriter;
53
54
public class FileSinkGEXF extends FileSinkBase {
55
	XMLStreamWriter stream;
56
	boolean smart;
57
	int depth;
58
	int currentAttributeIndex = 0;
59
60
	public FileSinkGEXF() {
61
		smart = true;
62
		depth = 0;
63
	}
64
65
	protected void outputEndOfFile() throws IOException {
66
		try {
67 1 1. outputEndOfFile : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
			endElement(stream, false);
68 1 1. outputEndOfFile : removed call to javax/xml/stream/XMLStreamWriter::writeEndDocument → NO_COVERAGE
			stream.writeEndDocument();
69 1 1. outputEndOfFile : removed call to javax/xml/stream/XMLStreamWriter::flush → NO_COVERAGE
			stream.flush();
70
		} catch (XMLStreamException e) {
71
			throw new IOException(e);
72
		}
73
	}
74
75
	protected void outputHeader() throws IOException {
76
		Calendar cal = Calendar.getInstance();
77
		Date date = cal.getTime();
78
		DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
79
		
80
		try {
81
			stream = XMLOutputFactory.newFactory()
82
					.createXMLStreamWriter(output);
83 1 1. outputHeader : removed call to javax/xml/stream/XMLStreamWriter::writeStartDocument → NO_COVERAGE
			stream.writeStartDocument("UTF-8", "1.0");
84
85 1 1. outputHeader : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
			startElement(stream, "gexf");
86 1 1. outputHeader : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
			stream.writeAttribute("xmlns", "http://www.gexf.net/1.2draft");
87 1 1. outputHeader : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
			stream.writeAttribute("xmlns:xsi",
88
					"http://www.w3.org/2001/XMLSchema-instance");
89 1 1. outputHeader : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
			stream.writeAttribute("xsi:schemaLocation",
90
					"http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd");
91 1 1. outputHeader : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
			stream.writeAttribute("version", "1.2");
92
			
93 1 1. outputHeader : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
			startElement(stream, "meta");
94 1 1. outputHeader : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
			stream.writeAttribute("lastmodifieddate", df.format(date));
95 1 1. outputHeader : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
			startElement(stream, "creator");
96 1 1. outputHeader : removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE
			stream.writeCharacters("GraphStream - " + getClass().getName());
97 1 1. outputHeader : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
			endElement(stream, true);
98 1 1. outputHeader : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
			endElement(stream, false);
99
		} catch (XMLStreamException e) {
100
			throw new IOException(e);
101
		} catch (FactoryConfigurationError e) {
102
			throw new IOException(e);
103
		}
104
	}
105
106
	protected void startElement(XMLStreamWriter stream, String name)
107
			throws XMLStreamException {
108 1 1. startElement : negated conditional → NO_COVERAGE
		if (smart) {
109 1 1. startElement : removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE
			stream.writeCharacters("\n");
110
111 3 1. startElement : changed conditional boundary → NO_COVERAGE
2. startElement : Changed increment from 1 to -1 → NO_COVERAGE
3. startElement : negated conditional → NO_COVERAGE
			for (int i = 0; i < depth; i++)
112 1 1. startElement : removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE
				stream.writeCharacters("\t");
113
		}
114
115 1 1. startElement : removed call to javax/xml/stream/XMLStreamWriter::writeStartElement → NO_COVERAGE
		stream.writeStartElement(name);
116 1 1. startElement : Replaced integer addition with subtraction → NO_COVERAGE
		depth++;
117
	}
118
119
	protected void endElement(XMLStreamWriter stream, boolean leaf)
120
			throws XMLStreamException {
121 1 1. endElement : Replaced integer subtraction with addition → NO_COVERAGE
		depth--;
122
123 2 1. endElement : negated conditional → NO_COVERAGE
2. endElement : negated conditional → NO_COVERAGE
		if (smart && !leaf) {
124 1 1. endElement : removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE
			stream.writeCharacters("\n");
125
126 3 1. endElement : changed conditional boundary → NO_COVERAGE
2. endElement : Changed increment from 1 to -1 → NO_COVERAGE
3. endElement : negated conditional → NO_COVERAGE
			for (int i = 0; i < depth; i++)
127 1 1. endElement : removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE
				stream.writeCharacters("\t");
128
		}
129
130 1 1. endElement : removed call to javax/xml/stream/XMLStreamWriter::writeEndElement → NO_COVERAGE
		stream.writeEndElement();
131
	}
132
133
	@Override
134
	protected void exportGraph(Graph g) {
135
		GEXFAttributeMap nodeAttributes = new GEXFAttributeMap("node", g);
136
		GEXFAttributeMap edgeAttributes = new GEXFAttributeMap("edge", g);
137
138
		try {
139 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
			startElement(stream, "graph");
140 1 1. exportGraph : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
			stream.writeAttribute("defaultedgetype", "undirected");
141
142 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF$GEXFAttributeMap::export → NO_COVERAGE
			nodeAttributes.export(stream);
143 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF$GEXFAttributeMap::export → NO_COVERAGE
			edgeAttributes.export(stream);
144
145 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
			startElement(stream, "nodes");
146 1 1. exportGraph : negated conditional → NO_COVERAGE
			for (Node n : g.getEachNode()) {
147 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
				startElement(stream, "node");
148 1 1. exportGraph : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
				stream.writeAttribute("id", n.getId());
149
150 1 1. exportGraph : negated conditional → NO_COVERAGE
				if (n.hasAttribute("label"))
151 1 1. exportGraph : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
					stream.writeAttribute("label", n.getAttribute("label")
152
							.toString());
153
154 2 1. exportGraph : changed conditional boundary → NO_COVERAGE
2. exportGraph : negated conditional → NO_COVERAGE
				if (n.getAttributeCount() > 0) {
155 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
					startElement(stream, "attvalues");
156 1 1. exportGraph : negated conditional → NO_COVERAGE
					for (String key : n.getAttributeKeySet())
157 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF$GEXFAttributeMap::push → NO_COVERAGE
						nodeAttributes.push(stream, n, key);
158 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
					endElement(stream, false);
159
				}
160
161 2 1. exportGraph : negated conditional → NO_COVERAGE
2. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
				endElement(stream, n.getAttributeCount() == 0);
162
			}
163 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
			endElement(stream, false);
164
165 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
			startElement(stream, "edges");
166 1 1. exportGraph : negated conditional → NO_COVERAGE
			for (Edge e : g.getEachEdge()) {
167 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
				startElement(stream, "edge");
168
169 1 1. exportGraph : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
				stream.writeAttribute("id", e.getId());
170 1 1. exportGraph : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
				stream.writeAttribute("source", e.getSourceNode().getId());
171 1 1. exportGraph : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
				stream.writeAttribute("target", e.getTargetNode().getId());
172
173 2 1. exportGraph : changed conditional boundary → NO_COVERAGE
2. exportGraph : negated conditional → NO_COVERAGE
				if (e.getAttributeCount() > 0) {
174 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
					startElement(stream, "attvalues");
175 1 1. exportGraph : negated conditional → NO_COVERAGE
					for (String key : e.getAttributeKeySet())
176 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF$GEXFAttributeMap::push → NO_COVERAGE
						nodeAttributes.push(stream, e, key);
177 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
					endElement(stream, false);
178
				}
179
180 2 1. exportGraph : negated conditional → NO_COVERAGE
2. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
				endElement(stream, e.getAttributeCount() == 0);
181
			}
182 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
			endElement(stream, false);
183
184 1 1. exportGraph : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
			endElement(stream, false);
185
		} catch (XMLStreamException e1) {
186 1 1. exportGraph : removed call to javax/xml/stream/XMLStreamException::printStackTrace → NO_COVERAGE
			e1.printStackTrace();
187
		}
188
	}
189
190
	public void edgeAttributeAdded(String sourceId, long timeId, String edgeId,
191
			String attribute, Object value) {
192
		throw new UnsupportedOperationException();
193
	}
194
195
	public void edgeAttributeChanged(String sourceId, long timeId,
196
			String edgeId, String attribute, Object oldValue, Object newValue) {
197
		throw new UnsupportedOperationException();
198
	}
199
200
	public void edgeAttributeRemoved(String sourceId, long timeId,
201
			String edgeId, String attribute) {
202
		throw new UnsupportedOperationException();
203
	}
204
205
	public void graphAttributeAdded(String sourceId, long timeId,
206
			String attribute, Object value) {
207
		throw new UnsupportedOperationException();
208
	}
209
210
	public void graphAttributeChanged(String sourceId, long timeId,
211
			String attribute, Object oldValue, Object newValue) {
212
		throw new UnsupportedOperationException();
213
	}
214
215
	public void graphAttributeRemoved(String sourceId, long timeId,
216
			String attribute) {
217
		throw new UnsupportedOperationException();
218
	}
219
220
	public void nodeAttributeAdded(String sourceId, long timeId, String nodeId,
221
			String attribute, Object value) {
222
		throw new UnsupportedOperationException();
223
	}
224
225
	public void nodeAttributeChanged(String sourceId, long timeId,
226
			String nodeId, String attribute, Object oldValue, Object newValue) {
227
		throw new UnsupportedOperationException();
228
	}
229
230
	public void nodeAttributeRemoved(String sourceId, long timeId,
231
			String nodeId, String attribute) {
232
		throw new UnsupportedOperationException();
233
	}
234
235
	public void edgeAdded(String sourceId, long timeId, String edgeId,
236
			String fromNodeId, String toNodeId, boolean directed) {
237
		throw new UnsupportedOperationException();
238
	}
239
240
	public void edgeRemoved(String sourceId, long timeId, String edgeId) {
241
		throw new UnsupportedOperationException();
242
	}
243
244
	public void graphCleared(String sourceId, long timeId) {
245
		throw new UnsupportedOperationException();
246
	}
247
248
	public void nodeAdded(String sourceId, long timeId, String nodeId) {
249
		throw new UnsupportedOperationException();
250
	}
251
252
	public void nodeRemoved(String sourceId, long timeId, String nodeId) {
253
		throw new UnsupportedOperationException();
254
	}
255
256
	public void stepBegins(String sourceId, long timeId, double step) {
257
		throw new UnsupportedOperationException();
258
	}
259
260
	class GEXFAttribute {
261
		int index;
262
		String key;
263
		String type;
264
265
		GEXFAttribute(String key, String type) {
266 1 1. : Replaced integer addition with subtraction → NO_COVERAGE
			this.index = currentAttributeIndex++;
267
			this.key = key;
268
			this.type = type;
269
		}
270
	}
271
272
	class GEXFAttributeMap extends HashMap<String, GEXFAttribute> {
273
		private static final long serialVersionUID = 6176508111522815024L;
274
		protected String type;
275
276
		GEXFAttributeMap(String type, Graph g) {
277
			this.type = type;
278
279
			Iterable<? extends Element> iterable;
280
281 1 1. : negated conditional → NO_COVERAGE
			if (type.equals("node"))
282
				iterable = (Iterable<? extends Element>) g.getNodeSet();
283
			else
284
				iterable = (Iterable<? extends Element>) g.getEdgeSet();
285
286 1 1. : negated conditional → NO_COVERAGE
			for (Element e : iterable) {
287 1 1. : negated conditional → NO_COVERAGE
				for (String key : e.getAttributeKeySet()) {
288
					Object value = e.getAttribute(key);
289
					String id = getID(key, value);
290
					String attType = "string";
291
292 1 1. : negated conditional → NO_COVERAGE
					if (containsKey(id))
293
						continue;
294
295 2 1. : negated conditional → NO_COVERAGE
2. : negated conditional → NO_COVERAGE
					if (value instanceof Integer || value instanceof Short)
296
						attType = "integer";
297 1 1. : negated conditional → NO_COVERAGE
					else if (value instanceof Long)
298
						attType = "long";
299 1 1. : negated conditional → NO_COVERAGE
					else if (value instanceof Float)
300
						attType = "float";
301 1 1. : negated conditional → NO_COVERAGE
					else if (value instanceof Double)
302
						attType = "double";
303 1 1. : negated conditional → NO_COVERAGE
					else if (value instanceof Boolean)
304
						attType = "boolean";
305 2 1. : negated conditional → NO_COVERAGE
2. : negated conditional → NO_COVERAGE
					else if (value instanceof URL || value instanceof URI)
306
						attType = "anyURI";
307 1 1. : negated conditional → NO_COVERAGE
					else if (value.getClass().isArray()
308 1 1. : negated conditional → NO_COVERAGE
							|| value instanceof Collection)
309
						attType = "liststring";
310
311
					put(id, new GEXFAttribute(key, attType));
312
				}
313
			}
314
		}
315
316
		String getID(String key, Object value) {
317 1 1. getID : mutated return of Object value for org/graphstream/stream/file/FileSinkGEXF$GEXFAttributeMap::getID to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return String.format("%s@%s", key, value.getClass().getName());
318
		}
319
320
		void export(XMLStreamWriter stream) throws XMLStreamException {
321 1 1. export : negated conditional → NO_COVERAGE
			if (size() == 0)
322
				return;
323
324 1 1. export : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
			startElement(stream, "attributes");
325 1 1. export : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
			stream.writeAttribute("class", type);
326
327 1 1. export : negated conditional → NO_COVERAGE
			for (GEXFAttribute a : values()) {
328 1 1. export : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
				startElement(stream, "attribute");
329 1 1. export : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
				stream.writeAttribute("id", Integer.toString(a.index));
330 1 1. export : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
				stream.writeAttribute("title", a.key);
331 1 1. export : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
				stream.writeAttribute("type", a.type);
332 1 1. export : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
				endElement(stream, true);
333
			}
334
335 2 1. export : negated conditional → NO_COVERAGE
2. export : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
			endElement(stream, size() == 0);
336
		}
337
338
		void push(XMLStreamWriter stream, Element e, String key)
339
				throws XMLStreamException {
340
			String id = getID(key, e.getAttribute(key));
341
			GEXFAttribute a = get(id);
342
343 1 1. push : negated conditional → NO_COVERAGE
			if (a == null) {
344
				// TODO
345
				return;
346
			}
347
348 1 1. push : removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE
			startElement(stream, "attvalue");
349 1 1. push : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
			stream.writeAttribute("for", Integer.toString(a.index));
350 1 1. push : removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE
			stream.writeAttribute("value", e.getAttribute(key).toString());
351 1 1. push : removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE
			endElement(stream, true);
352
		}
353
	}
354
355
	public static void main(String... args) throws Exception {
356
		Graph g = new AdjacencyListGraph("g");
357 1 1. main : removed call to org/graphstream/graph/Node::addAttribute → NO_COVERAGE
		g.addNode("A").addAttribute("label", "Node A");
358 1 1. main : removed call to org/graphstream/graph/Node::addAttribute → NO_COVERAGE
		g.addNode("B").addAttribute("test", 1.0);
359 1 1. main : removed call to org/graphstream/graph/Node::addAttribute → NO_COVERAGE
		g.addNode("C").addAttribute("test", "Test");
360 1 1. main : removed call to org/graphstream/graph/Node::addAttribute → NO_COVERAGE
		g.addNode("D").addAttribute("other", true);
361
362
		g.addEdge("AB", "A", "B");
363
364
		FileSinkGEXF out = new FileSinkGEXF();
365 1 1. main : removed call to org/graphstream/stream/file/FileSinkGEXF::writeAll → NO_COVERAGE
		out.writeAll(g, System.out);
366
	}
367
}

Mutations

67

1.1
Location : outputEndOfFile
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

68

1.1
Location : outputEndOfFile
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeEndDocument → NO_COVERAGE

69

1.1
Location : outputEndOfFile
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::flush → NO_COVERAGE

83

1.1
Location : outputHeader
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeStartDocument → NO_COVERAGE

85

1.1
Location : outputHeader
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

86

1.1
Location : outputHeader
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

87

1.1
Location : outputHeader
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

89

1.1
Location : outputHeader
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

91

1.1
Location : outputHeader
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

93

1.1
Location : outputHeader
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

94

1.1
Location : outputHeader
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

95

1.1
Location : outputHeader
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

96

1.1
Location : outputHeader
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE

97

1.1
Location : outputHeader
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

98

1.1
Location : outputHeader
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

108

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

109

1.1
Location : startElement
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE

111

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

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

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

112

1.1
Location : startElement
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE

115

1.1
Location : startElement
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeStartElement → NO_COVERAGE

116

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

121

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

123

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

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

124

1.1
Location : endElement
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE

126

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

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

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

127

1.1
Location : endElement
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeCharacters → NO_COVERAGE

130

1.1
Location : endElement
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeEndElement → NO_COVERAGE

139

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

140

1.1
Location : exportGraph
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

142

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF$GEXFAttributeMap::export → NO_COVERAGE

143

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF$GEXFAttributeMap::export → NO_COVERAGE

145

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

146

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

147

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

148

1.1
Location : exportGraph
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

150

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

151

1.1
Location : exportGraph
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

154

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

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

155

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

156

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

157

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF$GEXFAttributeMap::push → NO_COVERAGE

158

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

161

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

2.2
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

163

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

165

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

166

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

167

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

169

1.1
Location : exportGraph
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

170

1.1
Location : exportGraph
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

171

1.1
Location : exportGraph
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

173

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

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

174

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

175

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

176

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF$GEXFAttributeMap::push → NO_COVERAGE

177

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

180

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

2.2
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

182

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

184

1.1
Location : exportGraph
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

186

1.1
Location : exportGraph
Killed by : none
removed call to javax/xml/stream/XMLStreamException::printStackTrace → NO_COVERAGE

266

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

281

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

286

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

287

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

292

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

295

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location :
Killed by : none
negated conditional → NO_COVERAGE

297

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

299

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

301

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

303

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

305

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location :
Killed by : none
negated conditional → NO_COVERAGE

307

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

308

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

317

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

321

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

324

1.1
Location : export
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

325

1.1
Location : export
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

327

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

328

1.1
Location : export
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

329

1.1
Location : export
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

330

1.1
Location : export
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

331

1.1
Location : export
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

332

1.1
Location : export
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

335

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

2.2
Location : export
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

343

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

348

1.1
Location : push
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::startElement → NO_COVERAGE

349

1.1
Location : push
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

350

1.1
Location : push
Killed by : none
removed call to javax/xml/stream/XMLStreamWriter::writeAttribute → NO_COVERAGE

351

1.1
Location : push
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::endElement → NO_COVERAGE

357

1.1
Location : main
Killed by : none
removed call to org/graphstream/graph/Node::addAttribute → NO_COVERAGE

358

1.1
Location : main
Killed by : none
removed call to org/graphstream/graph/Node::addAttribute → NO_COVERAGE

359

1.1
Location : main
Killed by : none
removed call to org/graphstream/graph/Node::addAttribute → NO_COVERAGE

360

1.1
Location : main
Killed by : none
removed call to org/graphstream/graph/Node::addAttribute → NO_COVERAGE

365

1.1
Location : main
Killed by : none
removed call to org/graphstream/stream/file/FileSinkGEXF::writeAll → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 0.33