Refactor: Extract Method and other occurrences

What is the point to have extract method refactoring if the mechanism not detect any other similar code fragment?

I have code with (almost) the same repeated lines, and it is undisputed that code should be replace by one method. So I've tried extract method, but it only change one (selected) occurrence. It not recognize that the same code is in other places... even if "Find Matching Clones in Solution" or "Find Similar Code" recognize it as "the same code".

Am I doing something wrong, or the mechanism is unable to spot other occurrences?

2 comments
Comment actions Permalink

It looks as if you are talking about the same things as described here http://youtrack.jetbrains.com/issue/RSRP-274811.

0
Comment actions Permalink

This is exactly what I want to do. It is shame that this issue was reported almost 3 years ago other people was talking about this (many duplicate tickets) and yet... nothing was done about it :(

0

Please sign in to leave a comment.