I think this is bug is at least serious, or very likely critical. When I use the "Save Package Spec and Body" function (select package name -> Right Click -> Save Package Spec and Body), the saved source code have rows shifted randomly.
One will be lucky if this only corrupt the source code and cause compilation error. Sometimes column list of select statement ordered incorrectly, statements in if-then-else clause went into the incorrect 'else' block...
I faced this only with 18.104.22.168 DB, never had this problem with 10.2.0.4.
It's always advisable to provide a test case in order to get the quickest response. Otherwise anyone seeing this must commit to a little extra work to come up with a test case that reproduces the behavior. Very often such efforts are in vain, as a bug may occur for some edge-condition that you (or your environment) have hit upon.
Anyway, I see no prior bug logged for this, but I lucked out and was able to reproduce the behavior. My test case is a package spec/body combination of 300+ lines with a large block of lines up to 205 characters long each, and happens using a remote 22.214.171.124 DB -- not sure if the remote part is relevant.
I can log a bug, but will wait a day or so to see if you (or anyone else) can provide a smaller test case, or otherwise describe some special condition in which the behavior occurs.
I don't know what test case can I provide. The description in the original messsage is specific enough for me. The only problem is whether it's reproducible in your site. And luckily it did :)
I don't care whether you log a bug or not. I will not use that context menu option to save PL/SQL source anyway. But I think it is necessary to fix this bug, which can potentially cause serious data corruption (e.g., someone save the source from UAT and deploy to production...)
Thanks for the feedback. I was not able to reproduce the problem today in any environment, even the original where I saw the problem:
1) SQL Developer 3.0.04.34 / 3.1.06.44 on Win XP against a remote 126.96.36.199 Oracle on Linux
2) or against a local 188.8.131.52
3) or against a remote 10g XE on Win XP
If I had not saved the diff files from Tuesday, I would doubt my own memory. Very frustrating.
Since the issue is intermittent and, for me, apparently difficult to reproduce, logging a bug would probably just waste more development time. If anyone comes up with a solid test case, please post it.
This bug is very annoying cause it messes up code pretty bad...
I work in bank and official software for coding is sql developer, but cause of this bug people are turning to TOAD( don't get me wrong but this is very big BUG, I have no faith in SQL developers save specs and body anymore cause it hitted me more than 20 times)....
It's not very plesant when someone calls you in the middle of the night while you're sleepenig to urgently go back to work and says that you're code is not working as it supose to work, or that code didn't passed scheduled compile all because SAVE SPECS AND BODY messed up lines in code...
i have made some backup script that I use but it does not solve the issue....