As somebody who does interviews for developers in a Java shop, a very blunt view of things: Any coding you've done more than five years ago isn't relevant anymore. I can't remember what I did five years ago. It is probably outdated, replaced or not in use any more. Looking back at my projects from five years ago, I would probably not agree with most of the code, as I've learned a lot of new things. I do care about yo…
Why not let the candidate filter for this? Make it clear that you'd like them to stick around for X years or longer. Set up (communicated up front) bonuses, raises, clawbacks, etc. to make sure retention concerns are addressed.