SONARJAVA-211 Reimplement the rule to work exclusively on the AST