Extract code from API into MethodCommit#source_file method.