Java Runtime errors

Core environment and runtime library

https://java.com
Solution coverage:
Summary coverage:

Top patterns

  1. Index provided to the ArrayList method is either greater or equal to size of the list or less than 0
    No solution
  2. ArrayList.elementData() has thrown an ArrayIndexOutOfBoundsException

    Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array. In this case, you're trying to access a negative indexed element from the ArrayList.

    Check the source of this solution for more info

  3. Trying to access element at index outside the bounds of the ArrayList

    Ensure that the index provided to get() method is greater or equal to 0 and less than the size of the ArrayList.


DescriptionException TypeEntry MethodWeb pages

Index provided to the ArrayList method is either greater or equal to size of the list or less than 0

java.lang.IndexOutOfBoundsException
java.util.ArrayList.RangeCheck
1169Web pages
IndexOutOfBoundsExceptionArrayList.RangeCheck1169

ArrayList.elementData() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.ArrayList.elementData
384Web pages
1Solution
ArrayIndexOutOfBoundsExceptionArrayList.elementData384

Trying to access element at index outside the bounds of the ArrayList

java.lang.IndexOutOfBoundsException
java.util.ArrayList.get
235Web pages
1Solution
IndexOutOfBoundsExceptionArrayList.get235

ArrayList.addAll() has thrown a NullPointerException

java.lang.NullPointerException
java.util.ArrayList.addAll
140Web pages
NullPointerExceptionArrayList.addAll140

ArrayList.<init>() has thrown a NullPointerException

java.lang.NullPointerException
java.util.ArrayList.<init>
75Web pages
NullPointerExceptionArrayList.<init>75

ArrayList.<init>() has thrown an OutOfMemoryError

java.lang.OutOfMemoryError
java.util.ArrayList.<init>
70Web pages
OutOfMemoryErrorArrayList.<init>70

ArrayList.add() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.ArrayList.add
60Web pages
ArrayIndexOutOfBoundsExceptionArrayList.add60

ArrayList.add() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.add
59Web pages
IndexOutOfBoundsExceptionArrayList.add59

ArrayList.add() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
1 frames hidden
java.util.ArrayList.add
56Web pages
IndexOutOfBoundsExceptionArrayList.add56

ArrayList.add() has thrown an OutOfMemoryError

java.lang.OutOfMemoryError
java.util.ArrayList.add
51Web pages
OutOfMemoryErrorArrayList.add51

ArrayList.<init>() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
java.util.ArrayList.<init>
42Web pages
IllegalArgumentExceptionArrayList.<init>42

ArrayList.remove() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.ArrayList.remove
34Web pages
ArrayIndexOutOfBoundsExceptionArrayList.remove34

ArrayList.subListRangeCheck() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
java.util.ArrayList.subListRangeCheck
30Web pages
IllegalArgumentExceptionArrayList.subListRangeCheck30

ArrayList.subListRangeCheck() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.subListRangeCheck
29Web pages
IndexOutOfBoundsExceptionArrayList.subListRangeCheck29

ArrayList.writeObject() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.ArrayList.writeObject
26Web pages
ConcurrentModificationExceptionArrayList.writeObject26

ArrayList.sort() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.ArrayList.sort
22Web pages
ConcurrentModificationExceptionArrayList.sort22

ArrayList.iterator() has thrown an OutOfMemoryError

java.lang.OutOfMemoryError
java.util.ArrayList.iterator
20Web pages
OutOfMemoryErrorArrayList.iterator20

ArrayList.remove() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
1 frames hidden
java.util.ArrayList.remove
17Web pages
ArrayIndexOutOfBoundsExceptionArrayList.remove17

ArrayList.toArray() has thrown an ArrayStoreException

java.lang.ArrayStoreException
java.util.ArrayList.toArray
16Web pages
ArrayStoreExceptionArrayList.toArray16

ArrayList.remove() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.remove
14Web pages
IndexOutOfBoundsExceptionArrayList.remove14

ArrayList.<init>() has thrown a StackOverflowError

java.lang.StackOverflowError
java.util.ArrayList.<init>
12Web pages
StackOverflowErrorArrayList.<init>12

ArrayList.set() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.ArrayList.set
12Web pages
ArrayIndexOutOfBoundsExceptionArrayList.set12

ArrayList.get() has thrown a StackOverflowError

java.lang.StackOverflowError
java.util.ArrayList.get
12Web pages
StackOverflowErrorArrayList.get12

ArrayList.forEach() has thrown a ClassCastException

java.lang.ClassCastException
java.util.ArrayList.forEach
11Web pages
ClassCastExceptionArrayList.forEach11

ArrayList.forEach() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.ArrayList.forEach
10Web pages
ConcurrentModificationExceptionArrayList.forEach10

ArrayList.clear() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.ArrayList.clear
7Web pages
ArrayIndexOutOfBoundsExceptionArrayList.clear7

ArrayList.ensureExplicitCapacity() has thrown a NullPointerException

java.lang.NullPointerException
java.util.ArrayList.ensureExplicitCapacity
7Web pages
NullPointerExceptionArrayList.ensureExplicitCapacity7

ArrayList.toArray() has thrown an OutOfMemoryError

java.lang.OutOfMemoryError
java.util.ArrayList.toArray
5Web pages
OutOfMemoryErrorArrayList.toArray5

ArrayList.RangeCheck() has thrown a FailedOperationException

com.oracle.ovm.mgr.api.exception.FailedOperationException
java.util.ArrayList.RangeCheck
4Web pages
FailedOperationExceptionArrayList.RangeCheck4

ArrayList.writeObject() has thrown a BAD_PARAM

org.omg.CORBA.BAD_PARAM
8 frames hidden
java.util.ArrayList.writeObject
4Web pages
BAD_PARAMArrayList.writeObject4

ArrayList.iterator() has thrown a StackOverflowError

java.lang.StackOverflowError
java.util.ArrayList.iterator
4Web pages
StackOverflowErrorArrayList.iterator4

ArrayList.ensureCapacity() has thrown an OutOfMemoryError

java.lang.OutOfMemoryError
java.util.ArrayList.ensureCapacity
3Web pages
OutOfMemoryErrorArrayList.ensureCapacity3

ArrayList.writeObject() has thrown a NotSerializableException

java.io.NotSerializableException
java.util.ArrayList.writeObject
3Web pages
NotSerializableExceptionArrayList.writeObject3

ArrayList.set() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.set
3Web pages
IndexOutOfBoundsExceptionArrayList.set3

ArrayList.toArray() has thrown a NullPointerException

java.lang.NullPointerException
java.util.ArrayList.toArray
3Web pages
NullPointerExceptionArrayList.toArray3

ArrayList.addAll() has thrown an OutOfMemoryError

java.lang.OutOfMemoryError
java.util.ArrayList.addAll
2Web pages
OutOfMemoryErrorArrayList.addAll2

ArrayList.forEach() has thrown an AbstractCommand

io.github.nucleuspowered.nucleus.internal.command.AbstractCommand
java.util.ArrayList.forEach
2Web pages
AbstractCommandArrayList.forEach2

ArrayList.remove() has thrown an Error

java.lang.Error
java.util.ArrayList.remove
2Web pages
ErrorArrayList.remove2

ArrayList.toArray() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.ArrayList.toArray
2Web pages
ArrayIndexOutOfBoundsExceptionArrayList.toArray2

ArrayList.addAll() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.addAll
2Web pages
IndexOutOfBoundsExceptionArrayList.addAll2

ArrayList.toArray() has thrown a StackOverflowError

java.lang.StackOverflowError
java.util.ArrayList.toArray
2Web pages
StackOverflowErrorArrayList.toArray2

ArrayList.add() has thrown a StackOverflowError

java.lang.StackOverflowError
java.util.ArrayList.add
2Web pages
StackOverflowErrorArrayList.add2

ArrayList.removeIf() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.ArrayList.removeIf
2Web pages
ConcurrentModificationExceptionArrayList.removeIf2

ArrayList.get() has thrown a NullPointerException

java.lang.NullPointerException
3 frames hidden
java.util.ArrayList.get
1Web pages
NullPointerExceptionArrayList.get1

ArrayList.get() has thrown a NullPointerException

java.lang.NullPointerException
1 frames hidden
java.util.ArrayList.get
0Web pages
NullPointerExceptionArrayList.get0

ArrayList.rangeCheck() has thrown a SparkException

org.apache.spark.SparkException
java.util.ArrayList.rangeCheck
0Web pages
SparkExceptionArrayList.rangeCheck0

ArrayList.get() has thrown a VertxException

io.vertx.core.VertxException
java.util.ArrayList.get
0Web pages
VertxExceptionArrayList.get0

ArrayList.size() has thrown a VertxException

io.vertx.core.VertxException
java.util.ArrayList.size
0Web pages
VertxExceptionArrayList.size0

ArrayList.iterator() has thrown a VertxException

io.vertx.core.VertxException
java.util.ArrayList.iterator
0Web pages
VertxExceptionArrayList.iterator0
Package namePatterns foundSolution coverageSummary coverage
java.lang40372
java.io3874
java.awt3617
java.util.concurrent3503
java.lang.reflect3467
sun.reflect2111
java.util2073
java.net2070
javax.swing1384
java.security858
javax.naming842
java.sql691
sun.net.www.protocol.http689
sun.net.www.protocol.https682
sun.nio.ch458
java.util.zip290
sun.rmi.server287
java.nio.file267
java.util.regex260
sun.rmi.transport.tcp259
com.sun.jndi.ldap243
com.sun.org.apache.xerces.internal.impl236
com.sun.org.apache.xerces.internal.parsers222
javax.swing.plaf.basic217
sun.net.www.http217
java.util.stream182
sun.misc179
java.util.logging154
com.sun.org.apache.xerces.internal.jaxp151
java.nio148
java.util.jar142
javax.swing.text142
sun.launcher138
java.beans137
java.text133
javax.imageio130
sun.rmi.registry127
javax.net.ssl116
javax.management.remote.rmi116
javax.security.auth.login115
java.rmi114
com.sun.org.apache.xalan.internal.xsltc.trax110
sun.nio.cs110
java.awt.image104
javax.security.auth98
sun.rmi.transport97
java.nio.channels95
sun.instrument92
java.util.concurrent.locks88
java.awt.event86
Package nameClass namePatterns foundSolution coverageSummary coverage
java.utilTimerThread376
java.utilArrays164
java.utilArrayList160
java.utilHashMap126
java.utilCollections69
java.utilTreeMap66
java.utilResourceBundle63
java.utilAbstractCollection62
java.utilLinkedList61
java.utilScanner53
java.utilVector47
java.utilHashSet46
java.utilAbstractList39
java.utilTreeSet32
java.utilHashtable31
java.utilProperties30
java.utilFormatter28
java.utilServiceLoader$125
java.utilTimSort24
java.utilTimer23
java.utilOptional20
java.utilCalendar20
java.utilAbstractList$Itr19
java.utilComparableTimSort18
java.utilServiceLoader$LazyIterator17
java.utilLinkedHashMap17
java.utilDate15
java.utilTimeZone15
java.utilAbstractMap15
java.utilCollections$UnmodifiableCollection$114
java.utilServiceLoader13
java.utilCollections$UnmodifiableList12
java.utilWeakHashMap12
java.utilCollections$UnmodifiableCollection12
java.utilGregorianCalendar12
java.utilLocale12
java.utilFormatter$FormatSpecifier10
java.utilUUID10
java.utilStringTokenizer10
java.utilArrayList$Itr10
java.utilSubList9
java.utilArrayList$SubList9
java.utilHashMap$KeyIterator8
java.utilArrayDeque8
java.utilLinkedHashMap$LinkedHashIterator8
java.utilStack7
java.utilLinkedList$ListItr7
java.utilBitSet7
java.utilHashMap$HashIterator7
java.utilCollections$UnmodifiableMap7
Package nameClass nameMethod namePatterns foundSolution coverage
java.utilArrayList<init>22
java.utilArrayListreadObject20
java.utilArrayListadd16
java.utilArrayListwriteObject15
java.utilArrayListaddAll12
java.utilArrayListtoArray10
java.utilArrayListget9
java.utilArrayListremove9
java.utilArrayListset6
java.utilArrayListiterator5
java.utilArrayListsort5
java.utilArrayListensureCapacityInternal4
java.utilArrayListforEach4
java.utilArrayListensureCapacity4
java.utilArrayListRangeCheck3
java.utilArrayListsubListRangeCheck2
java.utilArrayListensureExplicitCapacity2
java.utilArrayListgrow2
java.utilArrayListsubList2
java.utilArrayListremoveIf1
java.utilArrayListrangeCheck1
java.utilArrayListcontains1
java.utilArrayListremoveAll1
java.utilArrayListelementData1
java.utilArrayListsize1
java.utilArrayListclear1
java.utilArrayListclone1
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
java.utilArrayList<init>ConcurrentModificationException8
java.utilArrayListaddOutOfMemoryError8
java.utilArrayListwriteObjectNotSerializableException8
java.utilArrayList<init>OutOfMemoryError5
java.utilArrayListremoveIndexOutOfBoundsException5
java.utilArrayListaddAllOutOfMemoryError5
java.utilArrayListreadObjectClassCastException4
java.utilArrayListensureCapacityOutOfMemoryError4
java.utilArrayListsetIndexOutOfBoundsException4
java.utilArrayListwriteObjectStackOverflowError4
java.utilArrayListsortIllegalArgumentException4
java.utilArrayListensureCapacityInternalOutOfMemoryError4
java.utilArrayListreadObjectInvalidClassException4
java.utilArrayListremoveArrayIndexOutOfBoundsException3
java.utilArrayListreadObjectMARSHAL3
java.utilArrayListiteratorStackOverflowError3
java.utilArrayListaddIndexOutOfBoundsException3
java.utilArrayListtoArrayOutOfMemoryError3
java.utilArrayListgetIndexOutOfBoundsException3
java.utilArrayListtoArrayArrayStoreException3
java.utilArrayListaddStackOverflowError2
java.utilArrayListreadObjectClassNotFoundException2
java.utilArrayListaddAllIndexOutOfBoundsException2
java.utilArrayList<init>StackOverflowError2
java.utilArrayListaddArrayIndexOutOfBoundsException2
java.utilArrayListtoArrayArrayIndexOutOfBoundsException2
java.utilArrayListgetNullPointerException2
java.utilArrayListsetArrayIndexOutOfBoundsException2
java.utilArrayListaddAllArrayIndexOutOfBoundsException2
java.utilArrayListreadObjectEOFException2
java.utilArrayListRangeCheckIndexOutOfBoundsException2
java.utilArrayListgrowOutOfMemoryError2
java.utilArrayListcontainsProviderException1
java.utilArrayListaddAllNullPointerException1
java.utilArrayList<init>NoSuchElementException1
java.utilArrayListwriteObjectSocketException1
java.utilArrayList<init>ArrayIndexOutOfBoundsException1
java.utilArrayListforEachConcurrentModificationException1
java.utilArrayListsubListIndexOutOfBoundsException1
java.utilArrayListsubListIllegalArgumentException1
java.utilArrayList<init>NullPointerException1
java.utilArrayListsubListRangeCheckIndexOutOfBoundsException1
java.utilArrayListiteratorOutOfMemoryError1
java.utilArrayListcloneArrayIndexOutOfBoundsException1
java.utilArrayListrangeCheckSparkException1
java.utilArrayListsortConcurrentModificationException1
java.utilArrayListgetVertxException1
java.utilArrayListreadObjectStreamCorruptedException1
java.utilArrayListsizeVertxException1
java.utilArrayListgetSparkException1