Refactor NameExpression get hash code