Newshot

Code Cloning and Procedural Abstraction in Scratch: A Large-Scale Study of Co-Existing Reuse Practices

Summary

arXiv:2611.23284v1 Announce Type: new Abstract: Code cloning is a long-standing software-evolution concern: duplicated implementations diverge as software changes. In block-based programming, however, duplication is an everyday reuse mechanism, and Scratch facilitates a copy-and-paste culture that may hinder abstraction. We study this relation in 2.04 million public Scratch projects. We compare cloned sequences with existing abstractions and examine how their use varies across Computational Thinking (CT) score levels. Clones occur in 6.2% of projects and custom blocks in 11.9%. Of 436,198 detected clone instances, 16.1% have a normalized sequence matching a custom block in the same project and 17.8% match a custom block only outside it. At the pattern level, 83 of the 100 most frequent clone patterns have counterparts implementable as custom blocks elsewhere in the corpus. Of the remaining 17 patterns, 15 are amenable to custom-block extraction, while in two cases the benefit of abstra…

Original text(via arXiv cs.SE)

Computer Science > Software Engineering

Title:Code Cloning and Procedural Abstraction in Scratch: A Large-Scale Study of Co-Existing Reuse Practices

Abstract:Code cloning is a long-standing software-evolution concern: duplicated implementations diverge as software changes. In block-based programming, however, duplication is an everyday reuse mechanism, and Scratch facilitates a copy-and-paste culture that may hinder abstraction. We study this relation in 2.04 million public Scratch projects. We compare cloned sequences with existing abstractions and examine how their use varies across Computational Thinking (CT) score levels. Clones occur in 6.2% of projects and custom blocks in 11.9%. Of 436,198 detected clone instances, 16.1% have a normalized sequence matching a custom block in the same project and 17.8% match a custom block only outside it. At the pattern level, 83 of the 100 most frequent clone patterns have counterparts implementable as custom blocks elsewhere in the corpus. Of the remaining 17 patterns, 15 are amenable to custom-block extraction, while in two cases the benefit of abstraction is ambiguous; no class of frequent clone resists abstraction in principle. Yet the abstractions that do exist are often shallow: 53.0% of custom blocks are parameter-free. Increased use of abstraction does not coincide with less cloning. Both become more prevalent at higher CT-score levels, and their combined use dominates the highest band. These findings are consistent with cloning and procedural abstraction being co-existing reuse practices rather than mutually exclusive stages. Closing that gap requires both instruction on when to abstract, not only how, and platform support for refactoring.
Comments:Accepted at BENEVOL 2026 - this https URL
Subjects:Software Engineering (cs.SE)
MSC classes:68-06
ACM classes:D.2.1
Cite as:arXiv:2611.23284 [cs.SE]
(or arXiv:2611.23284v1 [cs.SE] for this version)
https://doi.org/10.48550/arXiv.2611.23284 arXiv-issued DOI via DataCite (pending registration)

Submission history

Access Paper:

  • HTML (experimental)

Additional Features

  • Audio Summary

Current browse context:

References & Citations

  • Google Scholar
  • Semantic Scholar

BibTeX formatted citation

Bookmark

Bibliographic and Citation Tools

Code, Data and Media Associated with this Article

Demos

Recommenders and Search Tools

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by arXiv cs.SE
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗