AI for legacy code analysis