Certain menus are dynamically populated, for example the snippets and paste menus, but they just make the first letter of every entry be the accelerator; this often leads to duplicates. There's a couple of ways around this:
1. Hold a list of already-assigned accelerators and try to find an unused one for each new entry. Entries near the top are more likely to "win" their first letter. It might fail on large menus/small titles, just fall back to the duplicates in that case.
2. A complex and hard to write algorithm that tries to avoid the failures in (1) by identifying the failures and then prioritising them, doing a few iterations to try to get an optimal result.
3. Prepend a number as the accelerator. I'd be happy to see the Paste and Alt+G menus look like
1. Foo 2. Bar [...] 9. Warg a. Fred b. Plugh
but the snippets menus would be better with more contextual accelerators.