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.
I have encountered this a few times within the past few weeks. I will be working on an existing Java class which has several import statements and will add a reference to another class for the first time. When I press Ctrl+Shift+I (fix imports), many of my existing import statements are corrupted. For example, here is what it might look like before: import com.example.mypackage.MyClassOne; import com.example.mypackage.MyClassTwo; import com.example.mypackage.MyClassThree; import com.example.another.package.Foo; import com.example.another.package.Bar; Here is what it would look like afterwards: impoimport com.example.mypackage.MyClassOne; imimport com.example.mypackage.MyClassTwo; import com.example.mypackage.MyClassThree; import c com.example.another.package.Foo; import com.example.another.package.BarBar; It does not happen consistently so I can't say exactly what causes it sometimes but not others. But it does happen fairly often (every 2-3 days or so). Here is the configuration I have noticed it under; I am using the Java SE IDE and have installed all updates available through the AUC: Product Version: NetBeans IDE 6.5 (Build 200811100001) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\tq232c\.netbeans\6.5
The source was probably not reparsed correctly after a modification, and so the offsets in the tree do not match the updated source.
Sorry, but I am not able to reproduce it at all.
I have not seen this behavior in a couple of years now, so whatever caused it must either be fixed or very well hidden by now.