With close to one-third of code now AI-generated, a new study finds substantial increases in output and unexpected benefits.