Migrating legacy data structures based on variable overlay to Java