18960573. ADAPTING EXISTING SOURCE CODE SNIPPETS TO NEW CONTEXTS (Google LLC)
Contents
ADAPTING EXISTING SOURCE CODE SNIPPETS TO NEW CONTEXTS
Organization Name
Inventor(s)
Qianyu Zhang of Sunnyvale CA (US)
Rishabh Singh of San Jose CA (US)
Olivia Hatalsky of San Jose CA (US)
ADAPTING EXISTING SOURCE CODE SNIPPETS TO NEW CONTEXTS
This abstract first appeared for US patent application 18960573 titled 'ADAPTING EXISTING SOURCE CODE SNIPPETS TO NEW CONTEXTS
Original Abstract Submitted
Implementations are described herein for adapting existing source code snippets to new contexts. In various implementations, a command may be detected to incorporate an existing source code snippet into destination source code. An embedding may be generated based on the existing source code snippet, e.g., by processing the existing source code snippet using an encoder. The destination source code may be processed to identify one or more decoder constraints. Subject to the one or more decoder constraints, the embedding may be processed using a decoder to generate a new version of the existing source code snippet that is adapted to the destination source code.