> No no no no no.. 100% guarantee to have self assignment between variables. You need to have the complete AST for doing this type of refactoring.
Yes a regexp would be a very dangerous thing to run over the code and would pretty much guarantee breaking the code. To prevent self-assignment you could declare the variables as final first, but that wouldn't guarantee that the changes were correct. Kev
