Java Runtime errors

Core environment and runtime library

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

Top patterns

  1. ArrayList.rangeCheck() has thrown an IndexOutOfBoundsException
    No solution
  2. ArrayList.get() has thrown an IndexOutOfBoundsException

    Thrown if trying to access an index which is out of bounds on objects like String, Array, or Vector. Any negative integer less than or equal to -1 and positive integer greater than or equal to the size of the object is an index which would be out of bounds

  3. Arrays.copyOf() has thrown an OutOfMemoryError

    In Eclipse : go to Run --> Run Configurations --> then select the project under maven build --> then select the tab "JRE" --> then enter -Xmx1024m.

    This should increase the memory heap for all the builds/projects. The above memory size is 1 GB.

    Check the source of this solution for more info


DescriptionException TypeEntry MethodWeb pages

ArrayList.rangeCheck() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.rangeCheck
2140Web pages
IndexOutOfBoundsExceptionArrayList.rangeCheck2140

ArrayList.get() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
1 frames hidden
java.util.ArrayList.get
1965Web pages
1Solution
IndexOutOfBoundsExceptionArrayList.get1965

Arrays.copyOf() has thrown an OutOfMemoryError

java.lang.OutOfMemoryError
java.util.Arrays.copyOf
1436Web pages
1Solution
OutOfMemoryErrorArrays.copyOf1436

ArrayList.RangeCheck() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.RangeCheck
1262Web pages
IndexOutOfBoundsExceptionArrayList.RangeCheck1262

ArrayList.throwIndexOutOfBoundsException() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.throwIndexOutOfBoundsException
1185Web pages
IndexOutOfBoundsExceptionArrayList.throwIndexOutOfBoundsException1185

ArrayList.get() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
1 frames hidden
java.util.ArrayList.get
1158Web pages
IndexOutOfBoundsExceptionArrayList.get1158

ArrayList.get() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
1 frames hidden
java.util.ArrayList.get
1044Web pages
IndexOutOfBoundsExceptionArrayList.get1044

HashMap$HashIterator.nextEntry() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.HashMap$HashIterator.nextEntry
1025Web pages
ConcurrentModificationExceptionHashMap$HashIterator.nextEntry1025

ArrayList$Itr.checkForComodification() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.ArrayList$Itr.checkForComodification
948Web pages
1Solution
ConcurrentModificationExceptionArrayList$Itr.checkForComodification948

ArrayList$Itr.next() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
1 frames hidden
java.util.ArrayList$Itr.next
853Web pages
ConcurrentModificationExceptionArrayList$Itr.next853

Hashtable.put() has thrown a NullPointerException

java.lang.NullPointerException
java.util.Hashtable.put
732Web pages
1Solution
NullPointerExceptionHashtable.put732

ResourceBundle.throwMissingResourceException() has thrown a MissingResourceException

java.util.MissingResourceException
java.util.ResourceBundle.throwMissingResourceException
648Web pages
MissingResourceExceptionResourceBundle.throwMissingResourceException648

ResourceBundle.getBundleImpl() has thrown a MissingResourceException

java.util.MissingResourceException
1 frames hidden
java.util.ResourceBundle.getBundleImpl
623Web pages
MissingResourceExceptionResourceBundle.getBundleImpl623

AbstractList$Itr.checkForComodification() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.AbstractList$Itr.checkForComodification
623Web pages
ConcurrentModificationExceptionAbstractList$Itr.checkForComodification623

ResourceBundle.getBundle() has thrown a MissingResourceException

java.util.MissingResourceException
2 frames hidden
java.util.ResourceBundle.getBundle
617Web pages
MissingResourceExceptionResourceBundle.getBundle617

AbstractList$Itr.next() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
1 frames hidden
java.util.AbstractList$Itr.next
608Web pages
ConcurrentModificationExceptionAbstractList$Itr.next608

Vector.elementAt() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.Vector.elementAt
608Web pages
ArrayIndexOutOfBoundsExceptionVector.elementAt608

HashMap$KeyIterator.next() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
1 frames hidden
java.util.HashMap$KeyIterator.next
575Web pages
ConcurrentModificationExceptionHashMap$KeyIterator.next575

Scanner.throwFor() has thrown an InputMismatchException

java.util.InputMismatchException
java.util.Scanner.throwFor
566Web pages
InputMismatchExceptionScanner.throwFor566

Scanner.next() has thrown an InputMismatchException

java.util.InputMismatchException
1 frames hidden
java.util.Scanner.next
560Web pages
InputMismatchExceptionScanner.next560

Scanner.throwFor() has thrown a NoSuchElementException

java.util.NoSuchElementException
java.util.Scanner.throwFor
527Web pages
NoSuchElementExceptionScanner.throwFor527

Scanner.next() has thrown a NoSuchElementException

java.util.NoSuchElementException
1 frames hidden
java.util.Scanner.next
526Web pages
NoSuchElementExceptionScanner.next526

HashMap$HashIterator.nextNode() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.HashMap$HashIterator.nextNode
401Web pages
ConcurrentModificationExceptionHashMap$HashIterator.nextNode401

ResourceBundle.getObject() has thrown a MissingResourceException

java.util.MissingResourceException
java.util.ResourceBundle.getObject
382Web pages
MissingResourceExceptionResourceBundle.getObject382

ArrayList.elementData() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.ArrayList.elementData
381Web pages
1Solution
ArrayIndexOutOfBoundsExceptionArrayList.elementData381

Scanner.nextInt() has thrown an InputMismatchException

java.util.InputMismatchException
2 frames hidden
java.util.Scanner.nextInt
366Web pages
InputMismatchExceptionScanner.nextInt366

Scanner.nextInt() has thrown an InputMismatchException

java.util.InputMismatchException
3 frames hidden
java.util.Scanner.nextInt
363Web pages
InputMismatchExceptionScanner.nextInt363

Arrays.copyOfRange() has thrown an OutOfMemoryError

java.lang.OutOfMemoryError
java.util.Arrays.copyOfRange
355Web pages
OutOfMemoryErrorArrays.copyOfRange355

ArrayList.get() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
1 frames hidden
java.util.ArrayList.get
331Web pages
ArrayIndexOutOfBoundsExceptionArrayList.get331

ArrayList.get() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.ArrayList.get
325Web pages
ArrayIndexOutOfBoundsExceptionArrayList.get325

ResourceBundle.getString() has thrown a MissingResourceException

java.util.MissingResourceException
1 frames hidden
java.util.ResourceBundle.getString
296Web pages
MissingResourceExceptionResourceBundle.getString296

ServiceLoader.fail() has thrown a ServiceConfigurationError

java.util.ServiceConfigurationError
java.util.ServiceLoader.fail
276Web pages
ServiceConfigurationErrorServiceLoader.fail276

Objects.requireNonNull() has thrown a NullPointerException

java.lang.NullPointerException
java.util.Objects.requireNonNull
271Web pages
NullPointerExceptionObjects.requireNonNull271

Properties$LineReader.readLine() has thrown a NullPointerException

java.lang.NullPointerException
java.util.Properties$LineReader.readLine
270Web pages
NullPointerExceptionProperties$LineReader.readLine270

StringTokenizer.nextToken() has thrown a NoSuchElementException

java.util.NoSuchElementException
java.util.StringTokenizer.nextToken
266Web pages
NoSuchElementExceptionStringTokenizer.nextToken266

Scanner.nextLine() has thrown a NoSuchElementException

java.util.NoSuchElementException
java.util.Scanner.nextLine
258Web pages
NoSuchElementExceptionScanner.nextLine258

Random.nextInt() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
java.util.Random.nextInt
257Web pages
IllegalArgumentExceptionRandom.nextInt257

Stack.peek() has thrown an EmptyStackException

java.util.EmptyStackException
java.util.Stack.peek
254Web pages
EmptyStackExceptionStack.peek254

HashMap$EntryIterator.next() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
1 frames hidden
java.util.HashMap$EntryIterator.next
252Web pages
ConcurrentModificationExceptionHashMap$EntryIterator.next252

Scanner.nextInt() has thrown a NoSuchElementException

java.util.NoSuchElementException
2 frames hidden
java.util.Scanner.nextInt
239Web pages
NoSuchElementExceptionScanner.nextInt239

Scanner.nextInt() has thrown a NoSuchElementException

java.util.NoSuchElementException
3 frames hidden
java.util.Scanner.nextInt
234Web pages
NoSuchElementExceptionScanner.nextInt234

HashMap$EntryIterator.next() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
2 frames hidden
java.util.HashMap$EntryIterator.next
228Web pages
ConcurrentModificationExceptionHashMap$EntryIterator.next228

Properties.load0() has thrown a NullPointerException

java.lang.NullPointerException
1 frames hidden
java.util.Properties.load0
226Web pages
NullPointerExceptionProperties.load0226

Properties.load() has thrown a NullPointerException

java.lang.NullPointerException
2 frames hidden
java.util.Properties.load
224Web pages
NullPointerExceptionProperties.load224

HashMap$KeyIterator.next() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
1 frames hidden
java.util.HashMap$KeyIterator.next
213Web pages
ConcurrentModificationExceptionHashMap$KeyIterator.next213

ServiceLoader.access$300() has thrown a ServiceConfigurationError

java.util.ServiceConfigurationError
1 frames hidden
java.util.ServiceLoader.access$300
208Web pages
ServiceConfigurationErrorServiceLoader.access$300208

TimSort.mergeLo() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
java.util.TimSort.mergeLo
205Web pages
IllegalArgumentExceptionTimSort.mergeLo205

TimSort.mergeAt() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
1 frames hidden
java.util.TimSort.mergeAt
203Web pages
IllegalArgumentExceptionTimSort.mergeAt203

ArrayList.get() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.get
201Web pages
IndexOutOfBoundsExceptionArrayList.get201

LinkedList$ListItr.checkForComodification() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.LinkedList$ListItr.checkForComodification
200Web pages
ConcurrentModificationExceptionLinkedList$ListItr.checkForComodification200
Package namePatterns foundSolution coverageSummary coverage
java.lang7927
java.util.concurrent4667
java.io4419
java.lang.reflect4019
java.awt2397
java.net2282
sun.reflect2209
java.util1921
javax.swing1636
java.security1033
javax.naming1017
java.sql803
sun.net.www.protocol.http740
sun.net.www.protocol.https718
sun.nio.ch466
sun.rmi.server381
sun.rmi.transport.tcp326
java.util.zip322
com.sun.jndi.ldap289
java.util.regex285
com.sun.org.apache.xerces.internal.impl269
sun.net.www.http261
java.nio.file257
com.sun.org.apache.xerces.internal.parsers247
javax.swing.plaf.basic240
sun.misc236
java.util.logging172
com.sun.org.apache.xerces.internal.jaxp168
java.util.jar162
java.beans160
javax.swing.text158
java.nio157
sun.rmi.registry151
java.util.stream143
javax.security.auth.login143
java.text143
javax.management.remote.rmi142
java.rmi137
javax.imageio135
sun.rmi.transport134
sun.nio.cs131
javax.net.ssl129
java.awt.event124
com.sun.org.apache.xalan.internal.xsltc.trax117
java.awt.image115
javax.security.auth115
java.nio.channels110
java.rmi.server92
java.util.concurrent.locks90
javax.naming.directory88
Package nameClass namePatterns foundSolution coverageSummary coverage
java.utilArrayList188
java.utilArrays169
java.utilHashMap142
java.utilCollections75
java.utilTreeMap73
java.utilAbstractCollection69
java.utilLinkedList67
java.utilResourceBundle65
java.utilScanner54
java.utilVector52
java.utilHashSet51
java.utilTimerThread43
java.utilProperties40
java.utilHashtable37
java.utilAbstractList37
java.utilServiceLoader$137
java.utilTreeSet34
java.utilFormatter33
java.utilServiceLoader$LazyIterator27
java.utilTimSort26
java.utilTimer23
java.utilCalendar23
java.utilComparableTimSort22
java.utilAbstractList$Itr22
java.utilTimeZone20
java.utilLinkedHashMap19
java.utilAbstractMap19
java.utilServiceLoader15
java.utilFormatter$FormatSpecifier15
java.utilDate15
java.utilWeakHashMap14
java.utilCollections$UnmodifiableCollection14
java.utilCollections$UnmodifiableCollection$114
java.utilCollections$UnmodifiableList12
java.utilGregorianCalendar12
java.utilLocale11
java.utilUUID11
java.utilStringTokenizer11
java.utilArrayList$Itr10
java.utilOptional10
java.utilHashMap$HashIterator9
java.utilArrayList$SubList9
java.utilSubList9
java.utilArrayDeque9
java.utilLinkedHashMap$LinkedHashIterator8
java.utilHashMap$KeyIterator8
java.utilStack8
java.utilCollections$UnmodifiableMap7
java.utilLinkedList$ListItr7
java.utilBitSet7
Package nameClass nameMethod namePatterns foundSolution coverage
java.utilArraysmergeSort70
java.utilArrayssort52
java.utilCollectionssort49
java.utilTimerThreadmainLoop32
java.utilServiceLoader$1next31
java.utilArrayListreadObject28
java.utilFormatterformat28
java.utilHashMapput28
java.utilResourceBundlegetBundle27
java.utilAbstractCollectiontoArray26
java.utilArrayList<init>23
java.utilHashMapreadObject21
java.utilHashSetadd21
java.utilHashMapwriteObject21
java.utilAbstractCollectionaddAll20
java.utilArrayListadd19
java.utilArrayListget17
java.utilPropertiesload17
java.utilTimSortsort17
java.utilArrayscopyOf17
java.utilHashMap<init>16
java.utilComparableTimSortsort16
java.utilServiceLoader$LazyIteratornext15
java.utilArrayListaddAll15
java.utilTreeMapput14
java.utilTreeMapget14
java.utilResourceBundlefindBundle14
java.utilCollections$UnmodifiableCollection$1next13
java.utilArrayListwriteObject13
java.utilTimer<init>13
java.utilTreeSetadd13
java.utilHashtableput13
java.utilAbstractListadd13
java.utilArrayListtoArray12
java.utilAbstractList$Itrnext12
java.utilTimerThreadrun11
java.utilHashSet<init>10
java.utilServiceLoader$LazyIteratornextService10
java.utilHashSetiterator10
java.utilResourceBundlegetString9
java.utilCollections$UnmodifiableListget9
java.utilArrayListremove9
java.utilPropertiesgetProperty8
java.utilHashMapget8
java.utilTreeMapgetEntry8
java.utilScannernextInt8
java.utilAbstractCollectiontoString8
java.utilLinkedListremove8
java.utilScanner<init>8
java.utilTreeMapcompare8
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
java.utilArraysmergeSortNullPointerException25
java.utilCollectionssortIllegalArgumentException21
java.utilServiceLoader$1nextServiceConfigurationError20
java.utilArrayssortNullPointerException19
java.utilArraysmergeSortNoSuchMethodError19
java.utilHashMapwriteObjectNotSerializableException17
java.utilArrayssortIllegalArgumentException15
java.utilArraysmergeSortClassCastException12
java.utilHashMapputOutOfMemoryError11
java.utilCollections$UnmodifiableCollection$1nextConcurrentModificationException11
java.utilAbstractCollectiontoArrayConcurrentModificationException11
java.utilResourceBundlegetBundleMissingResourceException10
java.utilHashSetaddOutOfMemoryError8
java.utilArrayListwriteObjectNotSerializableException8
java.utilArrayssortClassCastException8
java.utilArrayListaddOutOfMemoryError8
java.utilFormatterformatIllegalFormatConversionException7
java.utilTreeMapgetNullPointerException7
java.utilTimSortsortNullPointerException7
java.utilTimer<init>OutOfMemoryError7
java.utilHashSetiteratorStackOverflowError7
java.utilTimer<init>AccessControlException6
java.utilCollectionssortNullPointerException6
java.utilTreeMapputNullPointerException6
java.utilCollectionssortUnsupportedOperationException6
java.utilArrayList<init>ConcurrentModificationException6
java.utilHashMap<init>OutOfMemoryError6
java.utilHashMapputStackOverflowError6
java.utilResourceBundlegetStringMissingResourceException6
java.utilComparableTimSortsortNullPointerException6
java.utilPropertiesgetPropertyStackOverflowError6
java.utilFormatterformatUnknownFormatConversionException6
java.utilArrayListgetIndexOutOfBoundsException5
java.utilHashSetaddStackOverflowError5
java.utilTreeMapputClassCastException5
java.utilCollectionsmaxNoSuchElementException5
java.utilServiceLoader$LazyIteratornextServiceConfigurationError5
java.utilLinkedListwriteObjectNotSerializableException5
java.utilTimerThreadmainLoopIOException5
java.utilComparableTimSortsortIllegalArgumentException5
java.utilTreeSetaddAllNullPointerException5
java.utilTreeSetaddClassCastException5
java.utilAbstractListaddNullPointerException5
java.utilArrayList<init>OutOfMemoryError5
java.utilArrayListreadObjectClassNotFoundException5
java.utilTimerThreadmainLoopNullPointerException5
java.utilArrayListreadObjectInvalidClassException5
java.utilVectoraddElementOutOfMemoryError5
java.utilAbstractCollectionaddAllIllegalStateException5
java.utilPropertiesloadNullPointerException5