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.
This bug was originally marked as duplicate of bug 138906, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 8.0.2 (Build 201411181905) VM: Java HotSpot(TM) 64-Bit Server VM, 24.79-b02, Java(TM) SE Runtime Environment, 1.7.0_79-b15 OS: Windows 7 User Comments: GUEST: Error with autosuggestion changing StringBuilder with string concatenations to chain of appends. Stacktrace: java.lang.ArrayIndexOutOfBoundsException: -1 at org.netbeans.modules.java.source.pretty.CharBuffer.eatAwayChars(CharBuffer.java:271) at org.netbeans.modules.java.source.pretty.VeryPretty.eatChars(VeryPretty.java:2573) at org.netbeans.modules.java.source.save.CasualDiff.copyTo(CasualDiff.java:5378) at org.netbeans.modules.java.source.save.CasualDiff.copyTo(CasualDiff.java:5362) at org.netbeans.modules.java.source.save.CasualDiff.diffBinary(CasualDiff.java:2114) at org.netbeans.modules.java.source.save.CasualDiff.diffTreeImpl(CasualDiff.java:4999)
Created attachment 154288 [details] stacktrace
Reassigning to java/Source. Please evaluate.
great, reproducble using data from ER 782653
The issue was caused by incorrectly assigned comments. A comment from some deep of + binary tree operator was assigned to the outermost op, so when the code changed to append(x), the 'x' attempted to copy wrong offsets. Fixed in jet-main#c35d8f62b9d3
Integrated into 'main-silver', will be available in build *201508050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/c35d8f62b9d3 User: Svata Dedic <sdedic@netbeans.org> Log: #253065: properly assign comments when infix and postfix trees are nested