In my opinion, it might be more correct to call it "the smell of code" - in the sense of Martin Fowler.
I do not think that you can change the default initialization separately - it will need to be used in combination with other refactoring methods. It is also assumed that you edited your code so that you do not need temporary variables:
try{ FILE_NAME = buildFileName(); //Do other stuff with file name } catch(Exception e){ ... System.exit(1); }
Then, an assumption is also made that this code segment is only the code in the method in which it is contained, i.e. a method does only one thing
When I code, it bothers me that I use dummy values with temporary variables, but I would only change it when I finished coding this section, and it solves the problem on my own - and only in combination with other refactoring steps.
Robben_Ford_Fan_boy
source share