Pharo 9 refactoring demonstrates some clever analysis: if you extract a method from an expression, it can find other occurrences of that expression in the class hierarchy!
https://pharoweekly.wordpress.com/2021/04/01/pharo-90-refactoring-support-improves-steadily/