Ok, let me start.
At first i implemented very simple flood fill. It was giving me wrong result because i forgot to "repaint" visited cell.
To check if land was already repainted i've added it to a hash set of Point objects.
All tests but last pass.
Then i do micro optimization to check if there is any land or any water on a map during parsing it - so that i can instantly give an answer (if there is everything water it will be w*h, if everything earth - 0).
But here comes the trick - last level is 900 & 400, and it contains few land spaces near the bottom.
My solution suffered performance problems.
When i ran performance wizard i saw that my program spends 90% of a time in a Hashset operations - Adding checked item & checking if item on a map is already checked (when queuing).
Then i realized that hashset should be replaced, i just used simple temporary two-dimensional array of boolean, and copied original map in it before checking. Repainting was done in a right way and the problem gone. 100%.
Question to developers: do you add any test cases as time flows? I think good one could be the next:
Create large map, and a large lake on it (like current last one).
Then give ALL points from the lake to test.
Thank you for a puzzle!