Extract Field refactoring
The Extract Field refactoring creates a field that holds the selected expression as the value and replaces its occurrences by reference to this newly created field.
You can opt to:
replace all occurrences of the expression
replace only a single occurrence of the expression
To invoke the refactoring, select an expression to be replaced with a field or place the caret over an expression and press &shortcut:IntroduceField; (Refactor | Extract | Field):