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.

Bug 248785 - Inline refactoring produces incorrect code
Summary: Inline refactoring produces incorrect code
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-20 23:23 UTC by mclaborn
Modified: 2015-01-28 22:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Before refactoring (31.99 KB, image/png)
2014-11-20 23:24 UTC, mclaborn
Details
After refactoring. "N" is completely out of place and variable name was not removed. (10.54 KB, image/png)
2014-11-20 23:25 UTC, mclaborn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mclaborn 2014-11-20 23:23:30 UTC
Product Version = NetBeans IDE 8.0.1 (Build 201408251540)
Operating System = Linux version 3.13.0-39-generic running on amd64
Java; VM; Vendor = 1.7.0_72
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.72-b04

Screen shots will be provided shortly.  The inline refactoring looks fine in the preview, but is incorrect when actually applied.  In the screen shots, I am refactoring the l_approval_status variable.  The 2 highlighted uses are the only uses in the method.
Comment 1 mclaborn 2014-11-20 23:24:13 UTC
Created attachment 150598 [details]
Before refactoring
Comment 2 mclaborn 2014-11-20 23:25:25 UTC
Created attachment 150599 [details]
After refactoring.  "N" is completely out of place and variable name was not removed.
Comment 3 Ralph Ruijs 2015-01-26 15:32:52 UTC
There was an issue with unloaded open documents, which has been fixed in 8.0.2. If the problem is not resolved, please reopen with steps to reproduce. Thanks!
Comment 4 mclaborn 2015-01-28 22:32:02 UTC
Results are very similar to 250081.