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.
Created attachment 155681 [details] Preview in Refactored ClassA.java Link: http://services.netbeans.org/synergy/client/app/#/case/5156/suite/2033 Product Version: NetBeans IDE Dev (Build 201508240002) Updates: Updates available Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14 System: Windows 7 version 6.1 running on amd64; Cp1252; en_IN (nb) User directory: C:\Users\GOKUMAR\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\GOKUMAR\AppData\Local\NetBeans\Cache\dev 1. Open invert_boolean.ClassA.java 2. Right into m2(...) body and from popup menu select 3. From main menu select Refactor > Invert Boolean..., type new name "method2" and press Preview Expected Preview in "Refactored ClassA.java": package invert_boolean; public class ClassA { public void m(){ System.out.println(!m1(3, 4, 5)); System.out.println(method2(true, false, true)); } public boolean m1(int a, int b, int c){ if (a * a + b * b == c * c) { return false; } return true; } public boolean method2(boolean a, boolean b, boolean c){ return (a && b) || (b && c) || ((2 > 3) && (4 < 1)); } } Actual Preview in "Refactored ClassA.java": <its empty> (I have attached snapshot of it) 4. If I click on "Do Refactor", the refactoring functionality actually works fine.
*** This bug has been marked as a duplicate of bug 254448 ***