Source Code Cloning and Its Impact on Software Maintenance
Keywords:
Source code cloning, software maintenance, code duplication, clone detection, refactoring, technical debt, defect propagation, software quality.Abstract
Source code cloning is an important issue in software maintenance because duplicated or near-duplicated code fragments can increase modification effort, defect propagation, and long-term system complexity. Software projects often develop code clones when developers copy existing logic to save time, implement similar features, reuse validation rules, or modify old modules without proper abstraction. Traditional maintenance practices may correct one cloned fragment but miss other similar copies, leading to inconsistent behavior and repeated defects across the system. This article focuses on source code cloning and its impact on software maintenance by examining clone types, duplication frequency, clone location, change consistency, defect recurrence, and refactoring difficulty. The study discusses how clone detection, clone classification, abstraction, modularization, and controlled refactoring can reduce maintenance risk and improve code quality. The article concludes that effective clone management can lower technical debt, improve maintainability, reduce repeated correction effort, and support more reliable software evolution.