The Inline Variable refactoring replaces redundant variable usage with its last assigned value.

In order to invoke the refactoring, move the cursor over the local variable and press &shortcut:Inline; (Refactor | Inline... ).

This will result in the following: