He’s not trying for adverse possession. Apparently the owner of the property doesn’t give a damn if he’s there. The key to this story is that the shack he is living in apparently offends some bureaucrat because it is not ‘up to code’.
Someone needs to introduce a baseball bat to that bureaucrat’s head. I’d suggest aluminum, as it’s likely to be pretty thick.
These days there are literally thousands of local, state and federal regulations that are probably violated by the structure—once any bureaucrat finds out about it the game is over...