IntHashtable.java

1
/*
2
 * This class is based on org.apache.IntHashMap.commons.lang
3
 * http://jakarta.apache.org/commons/lang/xref/org/apache/commons/lang/IntHashMap.html
4
 * It was adapted by Bruno Lowagie for use in iText,
5
 * reusing methods that were written by Paulo Soares.
6
 * Instead of being a hashtable that stores objects with an int as key,
7
 * it stores int values with an int as key.
8
 * 
9
 * This is the original license of the original class IntHashMap:
10
 * 
11
 * Licensed to the Apache Software Foundation (ASF) under one or more
12
 * contributor license agreements.  See the NOTICE file distributed with
13
 * this work for additional information regarding copyright ownership.
14
 * The ASF licenses this file to You under the Apache License, Version 2.0
15
 * (the "License"); you may not use this file except in compliance with
16
 * the License.  You may obtain a copy of the License at
17
 * 
18
 *      http://www.apache.org/licenses/LICENSE-2.0
19
 * 
20
 * Unless required by applicable law or agreed to in writing, software
21
 * distributed under the License is distributed on an "AS IS" BASIS,
22
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
 * See the License for the specific language governing permissions and
24
 * limitations under the License.
25
 * 
26
 * Note: originally released under the GNU LGPL v2.1, 
27
 * but rereleased by the original author under the ASF license (above).
28
 */
29
30
package com.lowagie.text.pdf;
31
32
import java.util.Arrays;
33
import java.util.Iterator;
34
import java.util.NoSuchElementException;
35
import com.lowagie.text.error_messages.MessageLocalization;
36
37
/***
38
 * <p>A hash map that uses primitive ints for the key rather than objects.</p>
39
 *
40
 * <p>Note that this class is for internal optimization purposes only, and may
41
 * not be supported in future releases of Jakarta Commons Lang.  Utilities of
42
 * this sort may be included in future releases of Jakarta Commons Collections.</p>
43
 *
44
 * @author Justin Couch
45
 * @author Alex Chaffee (alex@apache.org)
46
 * @author Stephen Colebourne
47
 * @author Bruno Lowagie (change Objects as keys into int values)
48
 * @author Paulo Soares (added extra methods)
49
 */
50
public class IntHashtable implements Cloneable {
51
52
    /***
53
     * The hash table data.
54
     */
55
    private transient Entry[] table;
56
57
    /***
58
     * The total number of entries in the hash table.
59
     */
60
    private transient int count;
61
62
    /***
63
     * The table is rehashed when its size exceeds this threshold.  (The
64
     * value of this field is (int)(capacity * loadFactor).)
65
     *
66
     * @serial
67
     */
68
    private int threshold;
69
70
    /***
71
     * The load factor for the hashtable.
72
     *
73
     * @serial
74
     */
75
    private float loadFactor;
76
77
    /***
78
     * <p>Constructs a new, empty hashtable with a default capacity and load
79
     * factor, which is <code>20</code> and <code>0.75</code> respectively.</p>
80
     */
81
    public IntHashtable() {
82
        this(150, 0.75f);
83
    }
84
85
    /***
86
     * <p>Constructs a new, empty hashtable with the specified initial capacity
87
     * and default load factor, which is <code>0.75</code>.</p>
88
     *
89
     * @param  initialCapacity the initial capacity of the hashtable.
90
     * @throws IllegalArgumentException if the initial capacity is less
91
     *   than zero.
92
     */
93
    public IntHashtable(int initialCapacity) {
94
        this(initialCapacity, 0.75f);
95
    }
96
97
    /***
98
     * <p>Constructs a new, empty hashtable with the specified initial
99
     * capacity and the specified load factor.</p>
100
     *
101
     * @param initialCapacity the initial capacity of the hashtable.
102
     * @param loadFactor the load factor of the hashtable.
103
     * @throws IllegalArgumentException  if the initial capacity is less
104
     *             than zero, or if the load factor is nonpositive.
105
     */
106
    public IntHashtable(int initialCapacity, float loadFactor) {
107
        super();
108 2 1. : changed conditional boundary → NO_COVERAGE
2. : negated conditional → NO_COVERAGE
        if (initialCapacity < 0) {
109
            throw new IllegalArgumentException(MessageLocalization.getComposedMessage("illegal.capacity.1", initialCapacity));
110
        }
111 2 1. : changed conditional boundary → NO_COVERAGE
2. : negated conditional → NO_COVERAGE
        if (loadFactor <= 0) {
112
            throw new IllegalArgumentException(MessageLocalization.getComposedMessage("illegal.load.1", String.valueOf(loadFactor)));
113
        }
114 1 1. : negated conditional → NO_COVERAGE
        if (initialCapacity == 0) {
115
            initialCapacity = 1;
116
        }
117
        this.loadFactor = loadFactor;
118
        table = new Entry[initialCapacity];
119 1 1. : Replaced float multiplication with division → NO_COVERAGE
        threshold = (int) (initialCapacity * loadFactor);
120
    }
121
122
    /***
123
     * <p>Returns the number of keys in this hashtable.</p>
124
     *
125
     * @return  the number of keys in this hashtable.
126
     */
127
    public int size() {
128
        return count;
129
    }
130
131
    /***
132
     * <p>Tests if this hashtable maps no keys to values.</p>
133
     *
134
     * @return  <code>true</code> if this hashtable maps no keys to values;
135
     *          <code>false</code> otherwise.
136
     */
137
    public boolean isEmpty() {
138 2 1. isEmpty : negated conditional → NO_COVERAGE
2. isEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return count == 0;
139
    }
140
141
    /***
142
     * <p>Tests if some key maps into the specified value in this hashtable.
143
     * This operation is more expensive than the <code>containsKey</code>
144
     * method.</p>
145
     *
146
     * <p>Note that this method is identical in functionality to containsValue,
147
     * (which is part of the Map interface in the collections framework).</p>
148
     *
149
     * @param      value   a value to search for.
150
     * @return     <code>true</code> if and only if some key maps to the
151
     *             <code>value</code> argument in this hashtable as
152
     *             determined by the <tt>equals</tt> method;
153
     *             <code>false</code> otherwise.
154
     * @throws  NullPointerException  if the value is <code>null</code>.
155
     * @see        #containsKey(int)
156
     * @see        #containsValue(int)
157
     * @see        java.util.Map
158
     */
159
    public boolean contains(int value) {
160
161
        Entry[] tab = table;
162 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 = tab.length; i-- > 0;) {
163 1 1. contains : negated conditional → NO_COVERAGE
            for (Entry e = tab[i]; e != null; e = e.next) {
164 1 1. contains : negated conditional → NO_COVERAGE
                if (e.value == value) {
165 1 1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
                    return true;
166
                }
167
            }
168
        }
169 1 1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return false;
170
     }
171
172
    /***
173
     * <p>Returns <code>true</code> if this HashMap maps one or more keys
174
     * to this value.</p>
175
     *
176
     * <p>Note that this method is identical in functionality to contains
177
     * (which predates the Map interface).</p>
178
     *
179
     * @param value value whose presence in this HashMap is to be tested.
180
     * @return boolean <code>true</code> if the value is contained
181
     * @see    java.util.Map
182
     * @since JDK1.2
183
     */
184
    public boolean containsValue(int value) {
185
        return contains(value);
186
    }
187
188
    /***
189
     * <p>Tests if the specified int is a key in this hashtable.</p>
190
     *
191
     * @param  key  possible key.
192
     * @return <code>true</code> if and only if the specified int is a
193
     *    key in this hashtable, as determined by the <tt>equals</tt>
194
     *    method; <code>false</code> otherwise.
195
     * @see #contains(int)
196
     */
197
    public boolean containsKey(int key) {
198
        Entry[] tab = table;
199
        int hash = key;
200 2 1. containsKey : Replaced bitwise AND with OR → NO_COVERAGE
2. containsKey : Replaced integer modulus with multiplication → NO_COVERAGE
        int index = (hash & 0x7FFFFFFF) % tab.length;
201 1 1. containsKey : negated conditional → NO_COVERAGE
        for (Entry e = tab[index]; e != null; e = e.next) {
202 2 1. containsKey : negated conditional → NO_COVERAGE
2. containsKey : negated conditional → NO_COVERAGE
            if (e.hash == hash && e.key == key) {
203 1 1. containsKey : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
                return true;
204
            }
205
        }
206 1 1. containsKey : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return false;
207
    }
208
209
    /***
210
     * <p>Returns the value to which the specified key is mapped in this map.</p>
211
     *
212
     * @param   key   a key in the hashtable.
213
     * @return  the value to which the key is mapped in this hashtable;
214
     *          <code>null</code> if the key is not mapped to any value in
215
     *          this hashtable.
216
     * @see     #put(int, int)
217
     */
218
    public int get(int key) {
219
        Entry[] tab = table;
220
        int hash = key;
221 2 1. get : Replaced bitwise AND with OR → NO_COVERAGE
2. get : Replaced integer modulus with multiplication → NO_COVERAGE
        int index = (hash & 0x7FFFFFFF) % tab.length;
222 1 1. get : negated conditional → NO_COVERAGE
        for (Entry e = tab[index]; e != null; e = e.next) {
223 2 1. get : negated conditional → NO_COVERAGE
2. get : negated conditional → NO_COVERAGE
            if (e.hash == hash && e.key == key) {
224 1 1. get : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
                return e.value;
225
            }
226
        }
227 1 1. get : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return 0;
228
    }
229
230
    /***
231
     * <p>Increases the capacity of and internally reorganizes this
232
     * hashtable, in order to accommodate and access its entries more
233
     * efficiently.</p>
234
     *
235
     * <p>This method is called automatically when the number of keys
236
     * in the hashtable exceeds this hashtable's capacity and load
237
     * factor.</p>
238
     */
239
    protected void rehash() {
240
        int oldCapacity = table.length;
241
        Entry[] oldMap = table;
242
243 2 1. rehash : Replaced integer multiplication with division → NO_COVERAGE
2. rehash : Replaced integer addition with subtraction → NO_COVERAGE
        int newCapacity = oldCapacity * 2 + 1;
244
        Entry[] newMap = new Entry[newCapacity];
245
246 1 1. rehash : Replaced float multiplication with division → NO_COVERAGE
        threshold = (int) (newCapacity * loadFactor);
247
        table = newMap;
248
249 3 1. rehash : changed conditional boundary → NO_COVERAGE
2. rehash : Changed increment from -1 to 1 → NO_COVERAGE
3. rehash : negated conditional → NO_COVERAGE
        for (int i = oldCapacity; i-- > 0;) {
250 1 1. rehash : negated conditional → NO_COVERAGE
            for (Entry old = oldMap[i]; old != null;) {
251
                Entry e = old;
252
                old = old.next;
253
254 2 1. rehash : Replaced bitwise AND with OR → NO_COVERAGE
2. rehash : Replaced integer modulus with multiplication → NO_COVERAGE
                int index = (e.hash & 0x7FFFFFFF) % newCapacity;
255
                e.next = newMap[index];
256
                newMap[index] = e;
257
            }
258
        }
259
    }
260
261
    /***
262
     * <p>Maps the specified <code>key</code> to the specified
263
     * <code>value</code> in this hashtable. The key cannot be
264
     * <code>null</code>. </p>
265
     *
266
     * <p>The value can be retrieved by calling the <code>get</code> method
267
     * with a key that is equal to the original key.</p>
268
     *
269
     * @param key     the hashtable key.
270
     * @param value   the value.
271
     * @return the previous value of the specified key in this hashtable,
272
     *         or <code>null</code> if it did not have one.
273
     * @throws  NullPointerException  if the key is <code>null</code>.
274
     * @see     #get(int)
275
     */
276
    public int put(int key, int value) {
277
        // Makes sure the key is not already in the hashtable.
278
        Entry[] tab = table;
279
        int hash = key;
280 2 1. put : Replaced bitwise AND with OR → NO_COVERAGE
2. put : Replaced integer modulus with multiplication → NO_COVERAGE
        int index = (hash & 0x7FFFFFFF) % tab.length;
281 1 1. put : negated conditional → NO_COVERAGE
        for (Entry e = tab[index]; e != null; e = e.next) {
282 2 1. put : negated conditional → NO_COVERAGE
2. put : negated conditional → NO_COVERAGE
            if (e.hash == hash && e.key == key) {
283
                int old = e.value;
284
                e.value = value;
285 1 1. put : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
                return old;
286
            }
287
        }
288
289 2 1. put : changed conditional boundary → NO_COVERAGE
2. put : negated conditional → NO_COVERAGE
        if (count >= threshold) {
290
            // Rehash the table if the threshold is exceeded
291 1 1. put : removed call to com/lowagie/text/pdf/IntHashtable::rehash → NO_COVERAGE
            rehash();
292
293
            tab = table;
294 2 1. put : Replaced bitwise AND with OR → NO_COVERAGE
2. put : Replaced integer modulus with multiplication → NO_COVERAGE
            index = (hash & 0x7FFFFFFF) % tab.length;
295
        }
296
 
297
         // Creates the new entry.
298
         Entry e = new Entry(hash, key, value, tab[index]);
299
         tab[index] = e;
300 1 1. put : Replaced integer addition with subtraction → NO_COVERAGE
         count++;
301 1 1. put : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
         return 0;
302
    }
303
304
    /***
305
     * <p>Removes the key (and its corresponding value) from this
306
     * hashtable.</p>
307
     *
308
     * <p>This method does nothing if the key is not present in the
309
     * hashtable.</p>
310
     *
311
     * @param   key   the key that needs to be removed.
312
     * @return  the value to which the key had been mapped in this hashtable,
313
     *          or <code>null</code> if the key did not have a mapping.
314
     */
315
    public int remove(int key) {
316
        Entry[] tab = table;
317
        int hash = key;
318 2 1. remove : Replaced bitwise AND with OR → NO_COVERAGE
2. remove : Replaced integer modulus with multiplication → NO_COVERAGE
        int index = (hash & 0x7FFFFFFF) % tab.length;
319 1 1. remove : negated conditional → NO_COVERAGE
        for (Entry e = tab[index], prev = null; e != null; prev = e, e = e.next) {
320 2 1. remove : negated conditional → NO_COVERAGE
2. remove : negated conditional → NO_COVERAGE
            if (e.hash == hash && e.key == key) {
321 1 1. remove : negated conditional → NO_COVERAGE
                if (prev != null) {
322
                    prev.next = e.next;
323
                } else {
324
                    tab[index] = e.next;
325
                }
326 1 1. remove : Replaced integer subtraction with addition → NO_COVERAGE
                count--;
327
                int oldValue = e.value;
328
                e.value = 0;
329 1 1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
                return oldValue;
330
            }
331
        }
332 1 1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return 0;
333
    }
334
335
    /***
336
     * <p>Clears this hashtable so that it contains no keys.</p>
337
     */
338
    public void clear() {
339
        Entry[] tab = table;
340 3 1. clear : changed conditional boundary → NO_COVERAGE
2. clear : Changed increment from -1 to 1 → NO_COVERAGE
3. clear : negated conditional → NO_COVERAGE
        for (int index = tab.length; --index >= 0;) {
341
            tab[index] = null;
342
        }
343
        count = 0;
344
    }
345
    
346
    /***
347
     * <p>Innerclass that acts as a datastructure to create a new entry in the
348
     * table.</p>
349
     */
350
    static class Entry {
351
        int hash;
352
        int key;
353
        int value;
354
        Entry next;
355
356
        /***
357
         * <p>Create a new entry with the given values.</p>
358
         *
359
         * @param hash The code used to hash the int with
360
         * @param key The key used to enter this in the table
361
         * @param value The value for this key
362
         * @param next A reference to the next entry in the table
363
         */
364
        protected Entry(int hash, int key, int value, Entry next) {
365
            this.hash = hash;
366
            this.key = key;
367
            this.value = value;
368
            this.next = next;
369
        }
370
        
371
        // extra methods for inner class Entry by Paulo
372
        public int getKey() {
373
            return key;
374
        }
375
        public int getValue() {
376
            return value;
377
        }
378
        protected Object clone() {
379 1 1. clone : negated conditional → NO_COVERAGE
            Entry entry = new Entry(hash, key, value, (next != null) ? (Entry)next.clone() : null);
380 1 1. clone : mutated return of Object value for com/lowagie/text/pdf/IntHashtable$Entry::clone to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return entry;
381
        }
382
    }
383
    
384
    // extra inner class by Paulo
385
    static class IntHashtableIterator implements Iterator {
386
        int index;
387
        Entry[] table;
388
        Entry entry;
389
        
390
        IntHashtableIterator(Entry[] table) {
391
            this.table = table;
392
            this.index = table.length;
393
        }
394
        public boolean hasNext() {
395 1 1. hasNext : negated conditional → NO_COVERAGE
            if (entry != null) {
396 1 1. hasNext : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
                return true;
397
            }
398 3 1. hasNext : changed conditional boundary → NO_COVERAGE
2. hasNext : Replaced integer subtraction with addition → NO_COVERAGE
3. hasNext : negated conditional → NO_COVERAGE
            while (index-- > 0) {
399 1 1. hasNext : negated conditional → NO_COVERAGE
                if ((entry = table[index]) != null) {
400 1 1. hasNext : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
                    return true;
401
                }
402
            }
403 1 1. hasNext : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
            return false;
404
        }
405
        
406
        public Object next() {
407 1 1. next : negated conditional → NO_COVERAGE
            if (entry == null) {
408 4 1. next : changed conditional boundary → NO_COVERAGE
2. next : Replaced integer subtraction with addition → NO_COVERAGE
3. next : negated conditional → NO_COVERAGE
4. next : negated conditional → NO_COVERAGE
                while ((index-- > 0) && ((entry = table[index]) == null));
409
            }
410 1 1. next : negated conditional → NO_COVERAGE
            if (entry != null) {
411
                Entry e = entry;
412
                entry = e.next;
413 1 1. next : mutated return of Object value for com/lowagie/text/pdf/IntHashtable$IntHashtableIterator::next to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
                return e;
414
            }
415
            throw new NoSuchElementException(MessageLocalization.getComposedMessage("inthashtableiterator"));
416
        }
417
        public void remove() {
418
            throw new UnsupportedOperationException(MessageLocalization.getComposedMessage("remove.not.supported"));
419
        }
420
    }
421
    
422
// extra methods by Paulo Soares:
423
424
    public Iterator getEntryIterator() {
425 1 1. getEntryIterator : mutated return of Object value for com/lowagie/text/pdf/IntHashtable::getEntryIterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return new IntHashtableIterator(table);
426
    }
427
    
428
    public int[] toOrderedKeys() {
429
        int[] res = getKeys();
430 1 1. toOrderedKeys : removed call to java/util/Arrays::sort → NO_COVERAGE
        Arrays.sort(res);
431 1 1. toOrderedKeys : mutated return of Object value for com/lowagie/text/pdf/IntHashtable::toOrderedKeys to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return res;
432
    }
433
    
434
    public int[] getKeys() {
435
        int[] res = new int[count];
436
        int ptr = 0;
437
        int index = table.length;
438
        Entry entry = null;
439
        while (true) {
440 1 1. getKeys : negated conditional → NO_COVERAGE
            if (entry == null)
441 4 1. getKeys : changed conditional boundary → NO_COVERAGE
2. getKeys : Changed increment from -1 to 1 → NO_COVERAGE
3. getKeys : negated conditional → NO_COVERAGE
4. getKeys : negated conditional → NO_COVERAGE
                while ((index-- > 0) && ((entry = table[index]) == null));
442 1 1. getKeys : negated conditional → NO_COVERAGE
            if (entry == null)
443
                break;
444
            Entry e = entry;
445
            entry = e.next;
446 1 1. getKeys : Changed increment from 1 to -1 → NO_COVERAGE
            res[ptr++] = e.key;
447
        }
448 1 1. getKeys : mutated return of Object value for com/lowagie/text/pdf/IntHashtable::getKeys to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return res;
449
    }
450
    
451
    public int getOneKey() {
452 1 1. getOneKey : negated conditional → NO_COVERAGE
        if (count == 0)
453 1 1. getOneKey : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
            return 0;
454
        int index = table.length;
455
        Entry entry = null;
456 4 1. getOneKey : changed conditional boundary → NO_COVERAGE
2. getOneKey : Changed increment from -1 to 1 → NO_COVERAGE
3. getOneKey : negated conditional → NO_COVERAGE
4. getOneKey : negated conditional → NO_COVERAGE
        while ((index-- > 0) && ((entry = table[index]) == null));
457 1 1. getOneKey : negated conditional → NO_COVERAGE
        if (entry == null)
458 1 1. getOneKey : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
            return 0;
459 1 1. getOneKey : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return entry.key;
460
    }
461
    
462
    public Object clone() {
463
        try {
464
            IntHashtable t = (IntHashtable)super.clone();
465
            t.table = new Entry[table.length];
466 3 1. clone : changed conditional boundary → NO_COVERAGE
2. clone : Changed increment from -1 to 1 → NO_COVERAGE
3. clone : negated conditional → NO_COVERAGE
            for (int i = table.length ; i-- > 0 ; ) {
467 1 1. clone : negated conditional → NO_COVERAGE
                t.table[i] = (table[i] != null)
468
                ? (Entry)table[i].clone() : null;
469
            }
470 1 1. clone : mutated return of Object value for com/lowagie/text/pdf/IntHashtable::clone to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return t;
471
        } catch (CloneNotSupportedException e) {
472
            // this shouldn't happen, since we are Cloneable
473
            throw new InternalError();
474
        }
475
    }
476
}

Mutations

108

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

2.2
Location :
Killed by : none
negated conditional → NO_COVERAGE

111

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

2.2
Location :
Killed by : none
negated conditional → NO_COVERAGE

114

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

119

1.1
Location :
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

138

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

162

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

163

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

164

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

165

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

169

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

200

1.1
Location : containsKey
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : containsKey
Killed by : none
Replaced integer modulus with multiplication → NO_COVERAGE

201

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

202

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

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

203

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

206

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

221

1.1
Location : get
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : get
Killed by : none
Replaced integer modulus with multiplication → NO_COVERAGE

222

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

223

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

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

224

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

227

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

243

1.1
Location : rehash
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

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

246

1.1
Location : rehash
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

249

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

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

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

250

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

254

1.1
Location : rehash
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : rehash
Killed by : none
Replaced integer modulus with multiplication → NO_COVERAGE

280

1.1
Location : put
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : put
Killed by : none
Replaced integer modulus with multiplication → NO_COVERAGE

281

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

282

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

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

285

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

289

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

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

291

1.1
Location : put
Killed by : none
removed call to com/lowagie/text/pdf/IntHashtable::rehash → NO_COVERAGE

294

1.1
Location : put
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : put
Killed by : none
Replaced integer modulus with multiplication → NO_COVERAGE

300

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

301

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

318

1.1
Location : remove
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : remove
Killed by : none
Replaced integer modulus with multiplication → NO_COVERAGE

319

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

320

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

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

321

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

326

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

329

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

332

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

340

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

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

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

379

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

380

1.1
Location : clone
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/IntHashtable$Entry::clone to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

395

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

396

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

398

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

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

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

399

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

400

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

403

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

407

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

408

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

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

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

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

410

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

413

1.1
Location : next
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/IntHashtable$IntHashtableIterator::next to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

425

1.1
Location : getEntryIterator
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/IntHashtable::getEntryIterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

430

1.1
Location : toOrderedKeys
Killed by : none
removed call to java/util/Arrays::sort → NO_COVERAGE

431

1.1
Location : toOrderedKeys
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/IntHashtable::toOrderedKeys to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

440

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

441

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

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

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

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

442

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

446

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

448

1.1
Location : getKeys
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/IntHashtable::getKeys to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

452

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

453

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

456

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

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

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

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

457

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

458

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

459

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

466

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

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

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

467

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

470

1.1
Location : clone
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/IntHashtable::clone to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.4.2