We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs

Change to browse by:

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Software Engineering

Title: On the Nature of Code Cloning in Open-Source Java Projects

Abstract: Code cloning plays a very important role in open-source software engineering. The presence of clones within a project may indicate a need for refactoring, and clones between projects are even more interesting, since code migration takes place and violations are possible. But how is code being copied? How prevalent is the process and on what level does it happen?
In this general study, we attempt to shed some light on these questions by searching for clones in a large dataset of over 23 thousand Java projects on the level of both files and methods, and by studying the code fragments themselves and their clone pairs. We study the size and the age of code fragments, the prevalence of their clones, relationships between exact and non-exact clones, as well as between method-level and file-level clones. We also discover and describe various anomalies in the code clones that were detected in the dataset.
Our research shows that the copying occurs all through the years of the Java code existence and that method-level copying is much more prevalent than file-level copying, with only 35.4% of methods having no clones at all. Additionally, some of the discovered anomalies can be useful for future large-scale cloning research as they can be used for removing auto-generated code.
Comments: 7 pages, 8 figures
Subjects: Software Engineering (cs.SE)
Cite as: arXiv:2107.04712 [cs.SE]
  (or arXiv:2107.04712v2 [cs.SE] for this version)

Submission history

From: Yaroslav Golubev [view email]
[v1] Fri, 9 Jul 2021 22:59:59 GMT (1131kb,D)
[v2] Fri, 13 Aug 2021 07:35:05 GMT (1120kb,D)

Link back to: arXiv, form interface, contact.