Created attachment 163310 [details]
picture shows it all
This is bug in 8.2. It works fine in 8.1.
In my very simple project when renaming Class "Orange" to "Apples", Netbeans 8.2 deletes everytime other class/portion of code! And this is all visible in refractoring preview window.
The bug is triggered by the multiple-variable declarator in inner classes preceding the refactored class. Fixed in jet-main#b200079cd5ac
Integrated into 'main-silver', will be available in build *201703010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Svata Dedic <firstname.lastname@example.org>
Log: #269455: variable common parent must be reset at the end of variable declarator/group