Code migrated from Bitbucket.