There is a neural pathway that triggers this to occur in about any human, under the right circumstances - just watch anyone doing something that demands deep focus or concentration combined with fine motor skills.
For example, watch a musician or a someone playing videogame and you can identify motor stereotypical moves in the facial muscles (specially tongue/mouth/jaw).
The stereotypical moves in autistic persons tend to be very characteristic and are easy to spot if you have a trained eye.
So don't worry about moving your toes in patterns or jiggling your leg while you are coding, it is perfectly normal.
I think the social model of disability is really helpful here. Regardless of what neurological commonalities there are or aren't, we have a set of social classifications of which potential stimming behaviors are normal or deviant. Tapping your leg is normal (sometimes annoying to people nearby, but normal), flapping is clearly deviant, and lots of other behaviors are somewhere in the middle. This is socially significant, regardless of whether it maps cleanly to some non-social difference.