I guess CoPilot has seen bit swapping in its Python training input but not in its Go training input.
The Python code is wrong because the 17th bit is shifted up, not down. Also, the bits are shifted by the wrong amount, not up/down by 11 (= 17 minus 6), but up by 6 and up by 17. What a joke.
Not only that, even if the shifts were correct, it's simply xoring the bits. The swap is completely wrong.
Yeah, it seems to be pretty heavily trained on Python. It's honestly still (and should be used as) a glorified autocomplete, which is pretty useful from time to time.
The Python code is wrong because the 17th bit is shifted up, not down. Also, the bits are shifted by the wrong amount, not up/down by 11 (= 17 minus 6), but up by 6 and up by 17. What a joke.
Not only that, even if the shifts were correct, it's simply xoring the bits. The swap is completely wrong.
Garbage code, total fail.