javax.swing.text.BadLocationException: Invalid offset=-1 not within <0, 6> at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1227) at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1222) at org.netbeans.editor.Utilities.getRowStart(Utilities.java:126) at org.netbeans.editor.Utilities.getRowStart(Utilities.java:109) at org.netbeans.modules.web.core.syntax.JspFormatter.reformat(JspFormatter.java:248) at org.netbeans.editor.ext.ExtFormatter.reformat(ExtFormatter.java:274) at org.netbeans.editor.ActionFactory$FormatAction.actionPerformed(ActionFactory.java:954) at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:194) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1571) at javax.swing.JComponent.processKeyBinding(JComponent.java:2763) at javax.swing.JComponent.processKeyBindings(JComponent.java:2798) at javax.swing.JComponent.processKeyEvent(JComponent.java:2726) at java.awt.Component.processEvent(Component.java:5265) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636) at java.awt.Component.dispatchEventImpl(Component.java:3841) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)