javax.swing.text.BadLocationException: Invalid offset=6784 > (docLen+1)=6743 at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetInContent(EditorDocumentContent.java:280) at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.createPosition(EditorDocumentContent.java:192) at javax.swing.text.AbstractDocument.createPosition(AbstractDocument.java:831) at org.netbeans.api.editor.fold.Fold.(Fold.java:145) at org.netbeans.api.editor.fold.FoldHierarchy$ApiPackageAccessorImpl.createFold(FoldHierarchy.java:355) at org.netbeans.modules.editor.fold.FoldOperationImpl.createFold(FoldOperationImpl.java:156) at org.netbeans.spi.editor.fold.FoldOperation.addToHierarchy(FoldOperation.java:136) at org.netbeans.modules.java.editor.fold.JavaElementFoldManager$CommitFolds.run(JavaElementFoldManager.java:394) at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1353) at org.netbeans.modules.java.editor.fold.JavaElementFoldManager$CommitFolds.run(JavaElementFoldManager.java:347) at org.netbeans.modules.java.editor.fold.JavaElementFoldManager$JavaElementFoldTask$1.run(JavaElementFoldManager.java:302) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705) at java.awt.EventQueue.access$000(EventQueue.java:101) at java.awt.EventQueue$3.run(EventQueue.java:666) at java.awt.EventQueue$3.run(EventQueue.java:664) at java.security.AccessController.doPrivileged(AccessController.java:0) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:675) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)