In the worksheet, I am creating a very long sql statement with about 4000 lines? Is there limit?
And the obvious question is: WHY? Why are you doing that?
When I have seen large statements like that in the past it has usually indicated a problem in the architecture somwhere.
What is it that requires such a large statement to begin with? A statement that large would have to exceed the 4k limit for a VARCHAR2 which means a CLOB is involved.
What sql developer version are you using? What type of connection are you using?
What database and full version are you using?