at least in the particle physics community, practically all anyone uses is open-source code. The most common are GEANT4 for simulating particles interacting with matter, and ROOT which handles data analysis. Both are maintained by dedicated people at CERN.
As to more specialized code, any time I've ever asked someone about their analysis, no matter what institution or relation (or lack of) to me, they've always been happy to share their code source with me. Usually with many caveats about quality, but it's there. The problem for us has always been knowing who to ask, so a dedicated central repository could be interesting.
Maybe a model like the arxiv.org could work. Almost everyone these days puts preprints of upcoming papers on the arxiv. Since there's no review system, you also get lots of garbage from crazies, but it's generally not hard to weed out if you know at least a little about the subject matter of your search, and trivial if you know the relevant big names in your field. In the same vein, a huge code repository where anyone could upload their junky scripts, tagged by name and subject/function/whatever, might work better than it would seem at first glance.