AI & ML
Code Cloning and Procedural Abstraction in Scratch: A Large-Scale Study of Co-Existing Reuse Practices
arXiv cs.SE0 views
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 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.
Source:https://arxiv.org/abs/2611.23284PreviousWhen Single Agent Is Enough: Rethinking Multi-Agent Systems for Automated Code ReviewNextPGPO: Prototype-Guided Progressive Obfuscation for Privacy-Preserving LLM-Enhanced Recommendation
Related posts
LVMH & OpenAI Partner to Empower AI Journalism
0dev.to AI
"Free AWS SAP-C03 Practice Tests on Udemy (Limited-Time Coupon)"
0dev.to AWS

Build Reusable Business AI with AWS Kiro: A 7-Step Plan
0dev.to AWS
How I Built a Native SketchUp Extension to Eliminate Viewport Lag
0dev.to WebDev
OpenSSH FIDO2 Resident Keys Need Presence, Verification, and Token Recovery Policy
0dev.to Security
Tired of LLM "Groundedness" Illusions? Meet My Automated Audit Framework
0dev.to Security