Code Reuse and Good Clones in Programming Education

Lenka Bubeňková, Emília Pietriková, Marek Horvath · 2025

This paper explores the concept of good code clones, which are recurring patterns in code that enhance software quality and maintainability. Traditionally, clones are seen as unfavorable due to their association with code smells, but our study finds that good clones can lead to better software structure and performance. We analyzed thousands of student submissions and observed that students who produced more good clones demonstrated better coding skills, higher grades, and, most importantly, adopted more robust software development practices. By identifying and encouraging good clones, which can be reusable patterns that follow best practices, educators can help students lay stronger foundations in programming, enabling them to master more complex topics confidently. This paper also discusses tools for clone detection and presents case studies of good clones in assignments, highlighting the educational benefits of distinguishing between harmful duplication and beneficial code reuse. We propose that embracing good clones in programming education can reassure professionals in the field about the effectiveness of the proposed approach in improving learning outcomes and software development practices.

Read the paper · More papers on PaperTik