Add AssignsOutAndRefParameters specs.
Fix code analysis errors.