This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 242303 - IndexOutOfBoundsException: Index: 7, Size: 6
Summary: IndexOutOfBoundsException: Index: 7, Size: 6
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-24 23:20 UTC by Exceptions Reporter
Modified: 2014-04-27 17:23 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 207940


Attachments
stacktrace (1.96 KB, text/plain)
2014-02-24 23:20 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2014-02-24 23:20:24 UTC
This bug was originally marked as duplicate of bug 238828, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201402210001)
VM: Java HotSpot(TM) Client VM, 24.51-b03, Java(TM) SE Runtime Environment, 1.7.0_51-b13
OS: Linux

User Comments:
ianfp: Trying to use the "Fixes use statement" keyboard shortcut.

GUEST: Tried to fix uses on a class that dodn't have  a namespace? Also it had short start tag. The lib it wanted to fix use of was from an include path, from another project.

GUEST: this error was silencious

GUEST: Many times when i try to ctrl+i (fix issues combination) after the issues are fixed in the code like formating, class names etc. .. the IDE Hangs. This happens at least once an hour and it is really annoing.

BreyndotEchse: Used "Fix Namespaces"

vriha: Happened after importing namespaces

GUEST: <Please provide a description of the problem or the steps to reproduce>

GUEST: I want automatically refactor use clauses and error occured.

GUEST: Using "Fix Imports" in PHP file

ianfp: I was using the "Fix use statements" keyboard shortcut.




Stacktrace: 
java.lang.IndexOutOfBoundsException: Index: 7, Size: 6
   at java.util.ArrayList.RangeCheck(ArrayList.java:635)
   at java.util.ArrayList.remove(ArrayList.java:474)
   at org.netbeans.modules.php.editor.actions.FixUsesPerformer.resolveDuplicateSelections(FixUsesPerformer.java:183)
   at org.netbeans.modules.php.editor.actions.FixUsesPerformer.processSelections(FixUsesPerformer.java:126)
   at org.netbeans.modules.php.editor.actions.FixUsesPerformer.perform(FixUsesPerformer.java:120)
   at org.netbeans.modules.php.editor.actions.FixUsesAction.performFixUses(FixUsesAction.java:190)
Comment 1 Exceptions Reporter 2014-02-24 23:20:27 UTC
Created attachment 145560 [details]
stacktrace
Comment 2 Ondrej Brejla 2014-02-25 09:31:14 UTC
All cases except the last one should be fixed in 7.4 patch 2 (issue #238828). I made some improvements for the last case, but can't verify it properly since we have no reproducible use case.

Fixed in web-main #c7ee2ff5ad26
Comment 3 Quality Engineering 2014-02-26 03:03:49 UTC
Integrated into 'main-silver', will be available in build *201402260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c7ee2ff5ad26
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #242303 - IndexOutOfBoundsException: Index: 7, Size: 6
Comment 4 Vladimir Riha 2014-04-16 07:25:51 UTC
Cannot reproduce, verified

Product Version: NetBeans IDE Dev (Build 201404150001)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Comment 5 Ondrej Brejla 2014-04-18 10:53:51 UTC
Transplanted to release80 branch.
Comment 6 Quality Engineering 2014-04-24 02:16:25 UTC
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/94df3db391df
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #242303 - IndexOutOfBoundsException: Index: 7, Size: 6
(transplanted from c7ee2ff5ad26118c3caaad4fedbd8fa9cb7d3be7)
Comment 7 Vladimir Riha 2014-04-27 17:23:56 UTC
Cannot reproduce, verified in patch

Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)