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.
Given the class below, when you insert code folding (select the whole main method and, click the lightbulb and "Surround with ..."), then the "baz" line is at the beginning of the line, due to the bar line which was commented out. public class Issue { public static void main(String[] args) { System.out.println("foo"); // System.out.println("bar"); System.out.println("baz"); } } Product Version: NetBeans IDE 8.2 (Build 201609300101) Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b15 Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b15 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)