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've had this happen a few times to me: I had the IDE open, and replaced a file from within a file manager. The IDE noted that change and asked me if I wanted to reload the file. I answered yes and the file was effectively reloaded so what was in the IDE matched what was on the HD. Then I compiled and ran the code (in debug mode).. that's where things started to go wrong.. when in the class matching the file that was reloaded, the lines shown in the IDE don't really match anything (or not necessarily, it depends on how much has been changed when you replaced a file and where in the file you are). I previously posted this issue in the mailing list and was told that it has to do with ant not recompiling classes. Now, if the IDE does recognize replaced files and offers to reload, wouldn't it be reasonable to assume that if you answered yes and then compiled, the modified file will be taken into account without manually having to do a make clean? If ant sticks to dates, then answering yes to the reload question could trigger a modified timestamp change so that ant will recompile the file no matter what, thus resulting in a consistent behavior of code shown in IDE and executed code.