I think this is an awful idea because the average freshman will learn from the output of the average sophomore, which is not good at all.
Cognitive apprenticeship solves this much like you are describing. The basic idea is that the sophmores will be able to better help the freshmen than the teacher will, because the sophmores are better able to remember their own struggles than the teacher is. Basically, the sophmores are in a state where they understand it the "good way" and also still understand the "wrong way". This puts them in a pretty good position to help.
After you've spent years learning, practicing, and mastering a topic and you've tried and failed to find anything more to learn about it, then teach it to others.
There's merit (a lot of merit) to the idea of pair programming as a way to learn programming. I just don't think the logistics of freshman/sophomores working together are realistic.
I have been observing how people learn and how things can be taught effectively. I noticed that the best teachers of a concept are those who have learned the concept most recently. If you've been programming for 20 years, it's hard to empathize with someone who has never coded before. But if you only started coding last year, it's easier to convey the thought processes required to learn the new information -- whatever field of knowledge it is in.
A sophomore can explain the concept of the function to the freshman and in the process learn it better him or herself. It's a win-win.
That's pretty much what we do with new starts where I work. Give them a mentor, get them stuck in, they pick up the basics very quickly and the complex stuff during the few months after that.
Perhaps we can group sophomores with freshmen. The sophomores are tasked with solving the problems and the freshmen are tasked with typing out the code. It also primes the seemingly naturally introverted programmers for group based activity that will benefit them in the long run.