They will always have the same name... there is getName() which returns a name for use in URLs. there is getDisplayName() which returns a localized name in the current locale (we can adapt the API to return the localizable directly if you need that access to all the translations).
The collection you get from the API will always be in getName() sorted order under Locale.ENGLISH. If you add a second source then the display name / name may get modified...
For example, one source has Pull Requests under the name pull-requests... another source has Change Requests under the name change-requests... these are both the same category, so when a multibranch project has multiple sources they will be combined into change-requests_pull-requests as the getName() and the getDisplayName() will be Change Requests / Pull Requests...
To give you a more concrete example...
If you have an Accurev source and a GitHub source in the same multibranch project (because say you are migrating from Accurev to GitHub) you could then have:
- An UnclassifiedSCMHeadCategory with a name of default and a display name of Branches / Streams
- A ChangeRequestSCMHeadCatgeory with a name of pull-requests and a display name of Pull Requests (because Accurev does not have change requests as a concept
- A (to be implemented) TagSCMHeadCategory with a name of snapshots_tags and a display name of Snapshots / Tags
If all this was in an organization folder, then the organization folder will have an UnclassifiedSCMSourceCategory with a name of default and a display name of Depots / Repositories
All because Accurev uses a different set of idiomatic names for the concepts.