Manually editing pasted code is a long-standing developer pain point. In internal software development at Google, we observe that code is pasted 4 times more often than it is manually typed. These paste actions frequently require follow-up edits, ranging from simple reformatting and renaming to more complex style adjustments and cross-language translations. Prior work has shown deep learning can be used to predict these edits. In this work, we show how to iteratively develop and scale Smart Paste, an IDE feature for post-paste edit suggestions, to Google's development environment. This experience can serve as a guide for AI practitioners on a holistic approach to feature development, covering user experience, system integration, and model capabilities. Since deployment, Smart Paste has had overwhelmingly positive feedback with a 45% acceptance rate. At Google's enterprise scale, these accepted suggestions account substantially for over 1% of all code written company-wide.
翻译:手动编辑粘贴的代码长期以来一直是开发者的痛点。在谷歌内部软件开发中,我们观察到代码被粘贴的频率是手动输入的4倍。这些粘贴操作通常需要后续编辑,从简单的格式调整和重命名,到更复杂的风格修正和跨语言翻译。先前的研究表明,深度学习可用于预测这些编辑。在本工作中,我们展示了如何迭代式地开发并规模化部署Smart Paste——一项用于粘贴后编辑建议的IDE功能——并集成至谷歌的开发环境。这一经验可为AI从业者提供功能开发的整体性方法指导,涵盖用户体验、系统集成和模型能力。自部署以来,Smart Paste获得了压倒性的积极反馈,接受率达45%。在谷歌的企业规模下,这些被接受的建议累计占据了全公司所有编写代码的1%以上。