This paper proposes a Type-2 code clone detection technique for Dockerfiles. Docker is a platform for realizing containerized virtual environments that has been attracting significant attention as a technology support for server infrastructures. In Docker, the procedure to realize a virtual environment is described in the form of a source code called a Dockerfile. Therefore, code clones such as repetitions and duplications with similar structures are often included. In this study, we propose a Type-2 code clone detection technique for deriving patterns within Dockerfiles. More specifically, our technique detects code clones by normalizing tokens properly, separating Docker syntax and shell syntax, and then adopting suffix array algorithm for each syntax. We conducted application experiments on approximately 5,000 Dockerfiles available on GitHub and found that our technique could detect Type-2 code clones with a high precision. Our technique derived some patterns in Dockerfiles, such as those used for building a new distribution on a container.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2025 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.