Real-world clone-detection in go

Qinyun Wu, Huan Song, Ping Yang · 2022

In the early stage of development, developers copied internal code snippets to enhance developing efficiency. With the rapid growth of Bytedance, similar or equivalent code snippets across different repositories or different product lines' codebases would potentially increase the cost of maintenance and distribute vulnerable code snippets. With the application of Clone-Detection, there are multiple well-established tools or techniques used for detecting similar code snippets in Java, JavaScript, Objective C and etc [1, 3]. We could hardly find similar tools available for Go, a widely-used programming language in the field of server development, especially at Bytedance. For the lack of public and labeled datasets, we utilized a great number of code snippets in Bytedance's codebase and trained an unsupervised model to propose Go-CopyCatch (GoCC), a tool and technique for Clone-Detection in Go.

Read the paper · More papers on PaperTik