SONARJAVA-9 Extract logic related to Visitor from AST