The actual codes are not published within the articles: to big, and pointless. However, the practice is to give the URI to where they are publicly hosted (usually on the forge of your research lab, like
https://gforge.liris.cnrs.fr/).
You only put in your article what is immediately relevant, for example an algorithm you are discussing. If if it big and really necessary, you put in the annexe.
Except for specific areas, source code are present in research: they are more an engineering problem. What you will see are demonstrators, prototypes, and examples. But very rarely clean production code, because that is not the objective.