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 195957 - StringIndexOutOfBoundsException: String index out of range: 25255 - Call Hierarchy
Summary: StringIndexOutOfBoundsException: String index out of range: 25255 - Call Hier...
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.0
Hardware: All All
: P4 normal (vote)
Assignee: Jan Becicka
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2011-02-24 17:03 UTC by ttokoly
Modified: 2011-05-09 13:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 172037


Attachments
stacktrace (2.35 KB, text/plain)
2011-02-24 17:03 UTC, ttokoly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ttokoly 2011-02-24 17:03:24 UTC
Build: NetBeans IDE Dev (Build 201102240001)
VM: Java HotSpot(TM) Client VM, 21.0-b02, Java(TM) SE Runtime Environment, 1.7.0-ea-b130
OS: Linux

User Comments:
GUEST: Walking through Java Call Hierarchy of callee's starting at main()

ttokoly: 1. Unzip a project CallHierarchy to some work directory - there is link:
http://wiki.netbeans.org/wiki/images/7/7e/SampleProjects_TS_65_CallHierarchy.zip
2. Start IDE with a clean userdir
3. Invoke File | Open Project... action
4. Select unzipped projects default
5. Scanning structure of project should be performed (It takes a while)

6. Open NewClassCycle1.java in editor
7. Invoke Call Hierarchy from the popup menu above the "gFunct" method on line 14 (you can view callers or callees)
8. Expand all nodes in the tree
9. Open main.java in the editor
10. Invoke Call Hierarchy from the popup menu above the "CapFirstLetterOfEachWord" method on line 45
11. Click Show Hierarchy of Callers to ensure you are viewing callers of "CapFirstLetterOfEachWord" method
12. Expand all nodes in the tree again 

According to the Refactoring Sanity Test Specification ( http://wiki.netbeans.org/STS_68_Refactoring -> Call Hierarchy - Expanding nodes ) should be all work fine, but in expanding second node in




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: 25255
   at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:870)
   at java.lang.StringBuilder.substring(StringBuilder.java:72)
   at java.lang.AbstractStringBuilder.subSequence(AbstractStringBuilder.java:849)
   at java.lang.StringBuilder.subSequence(StringBuilder.java:72)
   at org.netbeans.modules.refactoring.java.WhereUsedElement.create(WhereUsedElement.java:219)
   at org.netbeans.modules.refactoring.java.callhierarchy.CallOccurrence.createOccurrence(CallOccurrence.java:85)
Comment 1 ttokoly 2011-02-24 17:03:28 UTC
Created attachment 106422 [details]
stacktrace
Comment 2 Jan Becicka 2011-02-25 09:09:20 UTC
Cannot reproduce on Mac. Is it reproducible or rather RANDOM? Thanks
Comment 3 ttokoly 2011-02-25 11:33:56 UTC
I'm not sure, because I'm not at work (where I tested it), but i think YES, it's reproducible, I'm pretty sure, that I tryed it twice.

But for 100% certainty I can try reproduce it one more time - on monday.
Comment 4 ttokoly 2011-02-28 08:42:46 UTC
(In reply to comment #2)
> Cannot reproduce on Mac. Is it reproducible or rather RANDOM? Thanks

I've tested it now and I can't reproduce it, so - It's random.
Comment 5 Jan Becicka 2011-05-09 13:35:55 UTC
Cannot reproduce. Please reopen if it happans again.