FixedArrayList.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.util;
33
34
import java.util.ArrayList;
35
import java.util.Collection;
36
import java.util.NoSuchElementException;
37
import java.util.RandomAccess;
38
39
/**
40
 * Array list with immutable element indices.
41
 * 
42
 * <p>A fixed array list is like an array list, but it ensures the property that
43
 * each element will always stay at the same index, even if elements are
44
 * removed in between. The counterpart of this property is that the array
45
 * handles by itself the insertion of new elements (since when an element is
46
 * removed in the middle, this position can be reused), and therefore indices
47
 * cannot be chosen (i.e. only the {@link #add(Object)} and
48
 * {@link #addAll(Collection)} methods are usable to insert new elements in the
49
 * array).</p>
50
 * 
51
 * <p>This is the reason why this does not implement the List interface, because
52
 * the add(int,E) method cannot be implemented.</p>
53
 * 
54
 * <p>Furthermore, this array cannot contain null values, because it marks
55
 * unused positions within the array using the null value.</p>
56
 * 
57
 * @author Antoine Dutot
58
 * @since 20040912
59
 */
60
public class FixedArrayList<E>
61
	implements Collection<E>, RandomAccess
62
{
63
// Attributes
64
65
	/**
66
	 * List of elements.
67
	 */
68
	protected ArrayList<E> elements = new ArrayList<E>();
69
70
	/**
71
	 * List of free indices.
72
	 */
73
	protected ArrayList<Integer> freeIndices = new ArrayList<Integer>();
74
75
	/**
76
	 * Last inserted element index.
77
	 */
78
	protected int lastIndex = -1;
79
80
// Constructors
81
82
	public
83
	FixedArrayList()
84
	{
85
		elements = new ArrayList<E>();
86
		freeIndices = new ArrayList<Integer>( 16 );
87
	}
88
89
	public
90
	FixedArrayList( int capacity )
91
	{
92
		elements = new ArrayList<E>( capacity );
93
		freeIndices = new ArrayList<Integer>( 16 );
94
	}
95
96
// Accessors
97
98
	/**
99
	 * Number of elements in the array.
100
	 * @return The number of elements in the array.
101
	 */
102
	public int
103
	size()
104
	{
105 2 1. size : Replaced integer subtraction with addition → NO_COVERAGE
2. size : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return elements.size() - freeIndices.size();
106
	}
107
108
	/**
109
	 * Real size of the array, counting elements that have been erased.
110
	 * @see #unsafeGet(int)
111
	 */
112
	public int
113
	realSize()
114
	{
115 1 1. realSize : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return elements.size();
116
	}
117
118
	public boolean
119
	isEmpty()
120
	{
121 3 1. isEmpty : negated conditional → NO_COVERAGE
2. isEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
3. isEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return( size() == 0 );
122
	}
123
124
	/**
125
	 * I-th element.
126
	 * @param i The element index.
127
	 * @return The element at index <code>i</code>.
128
	 */
129
	public E
130
	get( int i )
131
	{
132
		E e = elements.get( i );
133
134 1 1. get : negated conditional → NO_COVERAGE
		if( e == null )
135
			throw new NoSuchElementException( "no element at index " + i );
136
137 1 1. get : mutated return of Object value for org/graphstream/util/FixedArrayList::get to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return e;
138
	}
139
140
	/**
141
	 * I-th element. Like the {@link #get(int)} method but it does not check
142
	 * the element does not exists at the given index.
143
	 * @param i The element index.
144
	 * @return The element at index <code>i</code>.
145
	 */
146
	public E
147
	unsafeGet( int i )
148
	{
149 1 1. unsafeGet : mutated return of Object value for org/graphstream/util/FixedArrayList::unsafeGet to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return elements.get( i );
150
	}
151
152
	public boolean
153
	contains( Object o )
154
	{
155
		int n = elements.size();
156
157 3 1. contains : changed conditional boundary → NO_COVERAGE
2. contains : Changed increment from 1 to -1 → NO_COVERAGE
3. contains : negated conditional → NO_COVERAGE
		for( int i=0; i<n; ++i )
158
		{
159
			E e = elements.get( i );
160
	
161 1 1. contains : negated conditional → NO_COVERAGE
			if( e != null )
162
			{
163 1 1. contains : negated conditional → NO_COVERAGE
				if( e == o )
164 1 1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
					return true;
165
166 1 1. contains : negated conditional → NO_COVERAGE
				if( elements.equals( o ) )
167 1 1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
					return true;
168
			}
169
		}
170
171 1 1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return false;
172
	}
173
174
	public boolean
175
	containsAll( Collection<?> c )
176
	{
177 1 1. containsAll : negated conditional → NO_COVERAGE
		for( Object o: c )
178
		{
179 1 1. containsAll : negated conditional → NO_COVERAGE
			if( ! contains( o ) )
180 1 1. containsAll : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
				return false;
181
		}
182
183 1 1. containsAll : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return true;
184
	}
185
186
	@Override
187
    @SuppressWarnings("unchecked")
188
	public boolean
189
	equals( Object o )
190
	{
191 1 1. equals : negated conditional → NO_COVERAGE
		if( o instanceof FixedArrayList )
192
		{
193
			FixedArrayList<? extends E> other = (FixedArrayList<? extends E>) o;
194
195
			int n = size();
196
197 1 1. equals : negated conditional → NO_COVERAGE
			if( other.size() == n )
198
			{
199 3 1. equals : changed conditional boundary → NO_COVERAGE
2. equals : Changed increment from 1 to -1 → NO_COVERAGE
3. equals : negated conditional → NO_COVERAGE
				for( int i=0; i<n; ++i )
200
				{
201
					E e0 = elements.get( i );
202
					E e1 = other.elements.get( i );
203
204 1 1. equals : negated conditional → NO_COVERAGE
					if( e0 != e1 )
205
					{
206 2 1. equals : negated conditional → NO_COVERAGE
2. equals : negated conditional → NO_COVERAGE
						if( e0 == null && e1 != null )
207 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
							return false;
208
209 2 1. equals : negated conditional → NO_COVERAGE
2. equals : negated conditional → NO_COVERAGE
						if( e0 != null && e1 == null )
210 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
							return false;
211
212 1 1. equals : negated conditional → NO_COVERAGE
						if( ! e0.equals( e1 ) )
213 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
							return false;
214
					}
215
				}
216
217 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
				return true;
218
			}
219
		}
220
221 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return false;
222
	}
223
224
	public java.util.Iterator<E>
225
	iterator()
226
	{
227 1 1. iterator : mutated return of Object value for org/graphstream/util/FixedArrayList::iterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return new FixedArrayIterator();
228
	}
229
230
	/**
231
	 * Last index used by the {@link #add(Object)} method.
232
	 * @return The last insertion index.
233
	 */
234
	public int
235
	getLastIndex()
236
	{
237 1 1. getLastIndex : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return lastIndex;
238
	}
239
	
240
	/**
241
	 * The index that will be used in case of a next insertion in this array.
242
	 * @return
243
	 */
244
	public int
245
	getNextAddIndex()
246
	{
247
		int n = freeIndices.size();
248
		
249 2 1. getNextAddIndex : changed conditional boundary → NO_COVERAGE
2. getNextAddIndex : negated conditional → NO_COVERAGE
		if( n > 0 )
250 2 1. getNextAddIndex : Replaced integer subtraction with addition → NO_COVERAGE
2. getNextAddIndex : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		     return freeIndices.get( n - 1 );
251 1 1. getNextAddIndex : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		else return elements.size();
252
	}
253
254
	public Object[]
255
	toArray()
256
	{
257
		int n = size();
258
		int m = elements.size();
259
		int j = 0;
260
		Object a[] = new Object[n];
261
262 3 1. toArray : changed conditional boundary → NO_COVERAGE
2. toArray : Changed increment from 1 to -1 → NO_COVERAGE
3. toArray : negated conditional → NO_COVERAGE
		for( int i=0; i<m; ++i )
263
		{
264
			E e = elements.get( i );
265
266 1 1. toArray : negated conditional → NO_COVERAGE
			if( e != null )
267 1 1. toArray : Changed increment from 1 to -1 → NO_COVERAGE
				a[j++] = e;
268
		}
269
270
		assert( j == n );
271 1 1. toArray : mutated return of Object value for org/graphstream/util/FixedArrayList::toArray to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
		return a;
272
	}
273
274
	public <T> T[]
275
	toArray( T[] a )
276
	{
277
		// TODO
278
		throw new RuntimeException( "not implemented yet" );
279
	}
280
281
// Commands
282
283
	/**
284
	 * Add one <code>element</code> in the array. The index used for inserting
285
	 * the element is then available using {@link #getLastIndex()}.
286
	 * @see #getLastIndex()
287
	 * @param element The element to add.
288
	 * @return Always true.
289
	 * @throws NullPointerException If a null value is inserted.
290
	 */
291
	public boolean
292
	add( E element )
293
		throws java.lang.NullPointerException
294
	{
295 1 1. add : negated conditional → NO_COVERAGE
		if( element == null )
296
			throw new java.lang.NullPointerException( "this array cannot contain null value" );
297
298
		int n = freeIndices.size();
299
300 2 1. add : changed conditional boundary → NO_COVERAGE
2. add : negated conditional → NO_COVERAGE
		if( n > 0 )
301
		{
302 1 1. add : Replaced integer subtraction with addition → NO_COVERAGE
			int i = freeIndices.remove( n - 1 );
303
			elements.set( i, element );
304
			lastIndex = i;
305
		}
306
		else
307
		{
308
			elements.add( element );
309 1 1. add : Replaced integer subtraction with addition → NO_COVERAGE
			lastIndex = elements.size() - 1;
310
		}
311
312 1 1. add : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return true;
313
	}
314
315
	public boolean
316
	addAll( Collection<? extends E> c )
317
		throws UnsupportedOperationException
318
	{
319
		java.util.Iterator<? extends E> k = c.iterator();
320
		
321 1 1. addAll : negated conditional → NO_COVERAGE
		while( k.hasNext() )
322
		{
323
			add( k.next() );
324
		}
325
326 1 1. addAll : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return true;
327
	}
328
329
	/**
330
	 * Remove the element at index <code>i</code>.
331
	 * @param i Index of the element to remove.
332
	 * @return The removed element.
333
	 */
334
	public E
335
	remove( int i )
336
	{
337
		int n = elements.size();
338
339 4 1. remove : changed conditional boundary → NO_COVERAGE
2. remove : changed conditional boundary → NO_COVERAGE
3. remove : negated conditional → NO_COVERAGE
4. remove : negated conditional → NO_COVERAGE
		if( i < 0 || i >= n )
340
			throw new ArrayIndexOutOfBoundsException( "index "+i+" does not exist" );
341
342 2 1. remove : changed conditional boundary → NO_COVERAGE
2. remove : negated conditional → NO_COVERAGE
		if( n > 0 )
343
		{
344 1 1. remove : negated conditional → NO_COVERAGE
			if( elements.get( i ) == null )
345
				throw new NullPointerException( "no element stored at index " + i );
346
347 2 1. remove : Replaced integer subtraction with addition → NO_COVERAGE
2. remove : negated conditional → NO_COVERAGE
			if( i == ( n - 1 ) )
348
			{
349 1 1. remove : mutated return of Object value for org/graphstream/util/FixedArrayList::remove to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return elements.remove( i );
350
			}
351
			else
352
			{
353
				E e = elements.get( i );
354
				elements.set( i, null );
355
				freeIndices.add( i );
356 1 1. remove : mutated return of Object value for org/graphstream/util/FixedArrayList::remove to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return e;
357
			}
358
		}
359
360
		throw new ArrayIndexOutOfBoundsException( "index "+i+" does not exist" );
361
	}
362
363
	protected void
364
	removeIt( int i )
365
	{
366
		remove( i );
367
	}
368
369
	/**
370
	 * Remove the element <code>e</code>.
371
	 * @param e The element to remove.
372
	 * @return True if removed.
373
	 */
374
	public boolean
375
	remove( Object e )
376
	{
377
		int n = elements.size();
378
379 3 1. remove : changed conditional boundary → NO_COVERAGE
2. remove : Changed increment from 1 to -1 → NO_COVERAGE
3. remove : negated conditional → NO_COVERAGE
		for( int i=0; i<n; ++i )
380
		{
381 1 1. remove : negated conditional → NO_COVERAGE
			if( elements.get( i ) == e )
382
			{
383
				elements.remove( i );
384 1 1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
				return true;
385
			}
386
		}
387
388 1 1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return false;
389
	}
390
391
	public boolean
392
	removeAll( Collection<?> c )
393
	{
394
		throw new UnsupportedOperationException( "not implemented yet" );
395
	}
396
397
	public boolean
398
	retainAll( Collection<?> c )
399
	{
400
		throw new UnsupportedOperationException( "not implemented yet" );
401
	}
402
403
	public void
404
	clear()
405
	{
406 1 1. clear : removed call to java/util/ArrayList::clear → NO_COVERAGE
		elements.clear();
407 1 1. clear : removed call to java/util/ArrayList::clear → NO_COVERAGE
		freeIndices.clear();
408
	}
409
410
// Nested classes
411
412
protected class FixedArrayIterator
413
	implements java.util.Iterator<E>
414
{
415
	int i;
416
417
	public
418
	FixedArrayIterator()
419
	{
420
		i = -1;
421
	}
422
423
	public boolean
424
	hasNext()
425
	{
426
		int n = elements.size();
427
428 4 1. hasNext : changed conditional boundary → NO_COVERAGE
2. hasNext : Changed increment from 1 to -1 → NO_COVERAGE
3. hasNext : Replaced integer addition with subtraction → NO_COVERAGE
4. hasNext : negated conditional → NO_COVERAGE
		for( int j=i+1; j<n; ++j )
429
		{
430 1 1. hasNext : negated conditional → NO_COVERAGE
			if( elements.get( j ) != null )
431 1 1. hasNext : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
				return true;
432
		}
433
434 1 1. hasNext : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return false;
435
	}
436
437
	public E
438
	next()
439
	{
440
		int n = elements.size();
441
442 4 1. next : changed conditional boundary → NO_COVERAGE
2. next : Changed increment from 1 to -1 → NO_COVERAGE
3. next : Replaced integer addition with subtraction → NO_COVERAGE
4. next : negated conditional → NO_COVERAGE
		for( int j=i+1; j<n; ++j )
443
		{
444
			E e = elements.get( j );
445
446 1 1. next : negated conditional → NO_COVERAGE
			if( e != null )
447
			{
448
				i = j;
449 1 1. next : mutated return of Object value for org/graphstream/util/FixedArrayList$FixedArrayIterator::next to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
				return e;
450
			}
451
		}
452
453
		throw new NoSuchElementException( "no more elements in iterator" );
454
	}
455
456
	public void
457
	remove()
458
		throws UnsupportedOperationException
459
	{
460
//		throw new UnsupportedOperationException( "not implemented yet" );
461
462 5 1. remove : changed conditional boundary → NO_COVERAGE
2. remove : changed conditional boundary → NO_COVERAGE
3. remove : negated conditional → NO_COVERAGE
4. remove : negated conditional → NO_COVERAGE
5. remove : negated conditional → NO_COVERAGE
		if( i >= 0 && i < elements.size() && elements.get( i ) != null )
463
		{
464 1 1. remove : removed call to org/graphstream/util/FixedArrayList::removeIt → NO_COVERAGE
			removeIt( i );	// A parent class method cannot be called if it has
465
							// the same name as one in the inner class
466
							// (normal), but even if they have distinct
467
							// arguments types. Hence this strange removeIt()
468
							// method...
469
		}
470
		else
471
		{
472
			throw new IllegalStateException( "no such element" );
473
		}
474
475
	}
476
}
477
478
}

Mutations

105

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

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

115

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

121

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

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

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

134

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

137

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

149

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

157

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

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

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

161

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

163

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

164

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

166

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

167

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

171

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

177

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

179

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

180

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

183

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

191

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

197

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

199

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

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

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

204

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

206

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

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

207

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

209

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

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

210

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

212

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

213

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

217

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

221

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

227

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

237

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

249

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

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

250

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

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

251

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

262

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

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

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

266

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

267

1.1
Location : toArray
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

271

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

295

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

300

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

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

302

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

309

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

312

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

321

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

326

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

339

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

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

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

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

342

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

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

344

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

347

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

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

349

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

356

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

379

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

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

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

381

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

384

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

388

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

406

1.1
Location : clear
Killed by : none
removed call to java/util/ArrayList::clear → NO_COVERAGE

407

1.1
Location : clear
Killed by : none
removed call to java/util/ArrayList::clear → NO_COVERAGE

428

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

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

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

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

430

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

431

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

434

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

442

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

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

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

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

446

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

449

1.1
Location : next
Killed by : none
mutated return of Object value for org/graphstream/util/FixedArrayList$FixedArrayIterator::next to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

462

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

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

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

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

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

464

1.1
Location : remove
Killed by : none
removed call to org/graphstream/util/FixedArrayList::removeIt → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 0.33